Duncan Sands
0d5fa5f018
Mark more constants unsigned, as warned about by icc ( #68 ).
...
Patch by Erick Tryzelaar.
llvm-svn: 81116
2009-09-06 12:56:52 +00:00
Duncan Sands
598fe699d0
Remove some not-really-used variables, as warned
...
about by icc (#593 , partial). Patch by Erick Tryzelaar.
llvm-svn: 81115
2009-09-06 12:41:19 +00:00
Benjamin Kramer
7155f79983
It's a bool, so treat it like one. Fixes a MSVC warning.
...
llvm-svn: 81112
2009-09-06 12:10:17 +00:00
Duncan Sands
10c1356bad
Remove some unused variables and methods warned about by
...
icc (#177 , partial). Patch by Erick Tryzelaar.
llvm-svn: 81106
2009-09-06 08:33:48 +00:00
Devang Patel
7b422c1956
Detect VLAs.
...
Do not use DenseMap operator[] because it inserts new entry if lookup fails. Use find() to check an entry in a DenseMap first.
llvm-svn: 81058
2009-09-05 00:34:14 +00:00
Devang Patel
c174e064b2
Ignore malformed global variable debug info.
...
llvm-svn: 81055
2009-09-04 23:59:07 +00:00
Lang Hames
e504e61ab5
Replaces uses of unsigned for indexes in LiveInterval and VNInfo with
...
a new class, MachineInstrIndex, which hides arithmetic details from
most clients. This is a step towards allowing the register allocator
to update/insert code during allocation.
llvm-svn: 81040
2009-09-04 20:41:11 +00:00
Duncan Sands
2037ffaa73
Use delete[] to match new[] (found by valgrind).
...
llvm-svn: 80997
2009-09-04 11:59:43 +00:00
Evan Cheng
46e40befe7
Run branch folding if if-converter make some transformations.
...
llvm-svn: 80994
2009-09-04 07:47:40 +00:00
Evan Cheng
284b38aaa7
Fix comment for consistency sake.
...
llvm-svn: 80993
2009-09-04 07:46:30 +00:00
Eric Christopher
a1d56b83f9
If there's a calling convention attach it to the rewind function call.
...
llvm-svn: 80976
2009-09-04 01:14:14 +00:00
Evan Cheng
86e6ec85a3
Funky indentation.
...
llvm-svn: 80971
2009-09-03 23:54:22 +00:00
Dan Gohman
c24fb1af4f
LLVM currently represents floating-point negation as -0.0 - x. Fix
...
FastISel to recognize this pattern and emit a floating-point
negation using xor.
llvm-svn: 80963
2009-09-03 22:53:57 +00:00
David Goodwin
1d8fbaf0ca
Don't crash when target has no itineraries.
...
llvm-svn: 80962
2009-09-03 22:48:51 +00:00
David Goodwin
79c36e5abd
Create our own block initializer for kill fixups as the scheduling one wasn't doing the right thing.
...
llvm-svn: 80958
2009-09-03 22:15:25 +00:00
Bob Wilson
10465d5aa9
Overhaul the TwoAddressInstructionPass to simplify the logic, especially
...
for the complicated case where one register is tied to multiple destinations.
This avoids the extra scan of instruction operands that was introduced by
my recent change. I also pulled some code out into a separate
TryInstructionTransform method, added more comments, and renamed some
variables.
Besides all those changes, this takes care of a FIXME in the code regarding
an assumption about there being a single tied use of a register when
converting to a 3-address form. I'm not aware of cases where that assumption
is violated, but the code now only attempts to transform an instruction,
either by commuting its operands or by converting to a 3-address form,
for the simple case where there is a single pair of tied operands.
llvm-svn: 80945
2009-09-03 20:58:42 +00:00
Dan Gohman
69e9573064
Recognize more opportunities to use SSE min and max instructions,
...
swapping the operands if necessary.
llvm-svn: 80940
2009-09-03 20:34:31 +00:00
Lang Hames
3c7f6b706c
Fixed a test that ensures the LocalRewriter does not attempt to
...
avoid reloads by reusing clobbered registers.
This was causing issues in 256.bzip2 when compiled with PIC for
a while (starting at r78217), though the problem has since been masked.
llvm-svn: 80872
2009-09-03 02:52:02 +00:00
Bob Wilson
02cbc5bd86
Rearrange code to eliminate redundancy and avoid gotos.
...
llvm-svn: 80798
2009-09-02 16:35:35 +00:00
Sandeep Patel
9c4e094e2a
Retype from unsigned to CallingConv::ID accordingly. Approved by Bob Wilson.
...
llvm-svn: 80773
2009-09-02 08:44:58 +00:00
Bob Wilson
e267a54022
Avoid calling removeVirtualRegisterKilled which iterates over the operands
...
to find the kill, since we already have the operand.
llvm-svn: 80736
2009-09-01 23:18:46 +00:00
Bob Wilson
4a9a3d96b5
Refactor some code into separate functions. No functional changes.
...
llvm-svn: 80733
2009-09-01 22:51:08 +00:00
Bob Wilson
626e983eed
Move use of LV inside condition that guards for null LV.
...
llvm-svn: 80731
2009-09-01 22:19:00 +00:00
Daniel Dunbar
9872eb764c
Remove Offset from ExternalSybmol MachineOperands, this is unused (and at least partly unsupported, in X86 encoding at least).
...
llvm-svn: 80726
2009-09-01 22:06:46 +00:00
Bruno Cardoso Lopes
f0ff8b695a
Fix ELF Writter related memory leaks
...
llvm-svn: 80717
2009-09-01 19:25:52 +00:00
Jim Grosbach
d0f70494f5
reduce size of SmallString to something more reasonable
...
llvm-svn: 80710
2009-09-01 18:55:08 +00:00
Jim Grosbach
38fc5b0277
Use raw_ostream instead of sstream
...
llvm-svn: 80704
2009-09-01 18:49:12 +00:00
David Goodwin
1b286bc320
Add hidden flags to allow binary search of post-RA scheduling errors.
...
llvm-svn: 80702
2009-09-01 18:34:03 +00:00
Jim Grosbach
7c2ffde625
revert inadvertant change from previous commit
...
llvm-svn: 80689
2009-09-01 17:19:13 +00:00
Jim Grosbach
ecd541affd
Simply LSDA lable emission to use a direct special-case output instead of
...
EmitLabel()
llvm-svn: 80677
2009-09-01 16:43:35 +00:00
Bob Wilson
03f5a5bfff
Fix pr4843: When an instruction has multiple destination registers that are
...
tied to different source registers, the TwoAddressInstructionPass needs to
be smarter. Change it to check before replacing a source register whether
that source register is tied to a different destination register, and if so,
defer handling it until a subsequent iteration.
llvm-svn: 80654
2009-09-01 04:18:40 +00:00
Jim Grosbach
9a220088ac
Clean up LSDA name generation and use for SJLJ exception handling. This
...
makes an eggregious hack somewhat more palatable. Bringing the LSDA forward
and making it a GV available for reference would be even better, but is
beyond the scope of what I'm looking to solve at this point.
Objective C++ code could generate function names that broke the previous
scheme. This fixes that.
llvm-svn: 80649
2009-09-01 01:57:56 +00:00
Devang Patel
fb8892d0e1
Subprogram is a scope. Derive DISubprogram from DIScope.
...
llvm-svn: 80637
2009-08-31 22:47:13 +00:00
Devang Patel
4a89fae1fe
Rename DIBlock as DILexicalBlock.
...
llvm-svn: 80633
2009-08-31 22:00:15 +00:00
Bob Wilson
afc5184593
Use early exit and reduce indentation.
...
llvm-svn: 80631
2009-08-31 21:54:55 +00:00
Bob Wilson
0b8a1e2f69
If the tied registers are already the same, there is no need to change
...
them. Move the code to make that change inside the conditional.
llvm-svn: 80630
2009-08-31 21:54:16 +00:00
Caroline Tice
e49e2d352c
Add flag to mark structs for Apple Block "byref" variables; also add code to
...
modify the type and location debug information for these variables to match the
programmer's expectations.
llvm-svn: 80625
2009-08-31 21:19:37 +00:00
David Goodwin
0fc3764297
Don't mark a register live at an undef use.
...
llvm-svn: 80621
2009-08-31 20:47:02 +00:00
Devang Patel
29f14e754f
Simplify isDerivedType() and other predicate interface.
...
llvm-svn: 80602
2009-08-31 18:49:10 +00:00
Bill Wendling
f1610b9af1
Output a hex value, because all of the others are hex.
...
llvm-svn: 80601
2009-08-31 18:26:48 +00:00
Duncan Sands
66fce0befb
Revert commit 80428. It completely broke exception
...
handling on x86-32 linux.
llvm-svn: 80592
2009-08-31 16:45:16 +00:00
Jim Grosbach
a09b5ac346
PR4747
...
Shared landing pads run into trouble with SJLJ, as the dispatch table is
mapped to call sites, and merging the pads will throw that off. There needs
to be a one-to-one mapping of landing pad exception table entries to invoke
call points.
Detecting the shared pad during lowering of SJLJ info insn't sufficient, as
the dispatch function may still need separate destinations to properly
handle phi-nodes.
llvm-svn: 80530
2009-08-31 01:35:03 +00:00
Bill Wendling
ccb2d3a3b8
Nuke moribund "std::string" version of EOL(..., Encoding).
...
llvm-svn: 80466
2009-08-30 00:28:57 +00:00
Bill Wendling
9dddea2ec3
- Add target lowering methods to get the preferred format for the FDE and LSDA
...
encodings.
- Make some of the values emitted by the FDEs dependent upon the pointer
size. This is in line with how GCC does things. And it has the benefit of
working for Darwin in 64-bit mode now.
llvm-svn: 80428
2009-08-29 12:20:54 +00:00
Bill Wendling
08c68ad0a9
Add a form of EOL which emits the text version of a DWARF format encoding. This
...
doesn't handle all values of the formatting. Those can be added as needed.
llvm-svn: 80427
2009-08-29 12:17:53 +00:00
Eric Christopher
77fd01a639
Make the augmentation size and next set of bytes agree on size,
...
and make the reference pointer size as it should be.
Fixes an abort on a testcase derived from libunwind's personality
test in 64-bit.
llvm-svn: 80414
2009-08-29 01:12:46 +00:00
David Goodwin
db0cb257be
Another stab at fixing up register kill flags after post-RA scheduling.
...
llvm-svn: 80410
2009-08-29 00:11:13 +00:00
Devang Patel
fbaeda732e
Reapply 79977.
...
Use MDNodes to encode debug info in llvm IR.
llvm-svn: 80406
2009-08-28 23:24:31 +00:00
Eric Christopher
f70a6035e0
Nuke trailing whitespace.
...
llvm-svn: 80401
2009-08-28 22:33:43 +00:00
Devang Patel
c1fe40a1b3
Closure is a very generic name. Use AppleBlock instead.
...
llvm-svn: 80307
2009-08-27 23:51:51 +00:00