Owen Anderson
9306de0727
Start the process of making MachineLoopInfo possible by templating Loop.
...
llvm-svn: 44097
2007-11-14 02:33:58 +00:00
Chris Lattner
68f04fa941
Fix the regression on Transforms/GlobalOpt/deadglobal-2.ll from my
...
patch on friday.
llvm-svn: 44068
2007-11-13 21:46:23 +00:00
Owen Anderson
d8167ab332
Run computeDomForest() on the set of registers that need to be tested for
...
interference.
llvm-svn: 44064
2007-11-13 20:13:24 +00:00
Owen Anderson
569ef71e44
Preserve LiveVariables when doing critical edge splitting.
...
llvm-svn: 44063
2007-11-13 20:04:45 +00:00
Dale Johannesen
7904708369
Revert previous; these files aren't ready to go in yet.
...
llvm-svn: 44057
2007-11-13 19:16:02 +00:00
Dale Johannesen
7a7085f6d3
Add parameter to getDwarfRegNum to permit targets
...
to use different mappings for EH and debug info;
no functional change yet.
Fix warning in X86CodeEmitter.
llvm-svn: 44056
2007-11-13 19:13:01 +00:00
Evan Cheng
c891ae92dc
Fix x86-64 jit: remove reliance on Dwarf numbers.
...
llvm-svn: 44048
2007-11-13 17:54:34 +00:00
Bill Wendling
77b13af9a6
Unifacalize the CALLSEQ{START,END} stuff.
...
llvm-svn: 44045
2007-11-13 09:19:02 +00:00
Chris Lattner
61ce4dff7a
Implement PR1786 by iterating between dead cycle elimination
...
and simplifycfg in the rare cases when it is needed.
llvm-svn: 44044
2007-11-13 07:32:38 +00:00
Bill Wendling
f359fed9f9
Unify CALLSEQ_{START,END}. They take 4 parameters: the chain, two stack
...
adjustment fields, and an optional flag. If there is a "dynamic_stackalloc" in
the code, make sure that it's bracketed by CALLSEQ_START and CALLSEQ_END. If
not, then there is the potential for the stack to be changed while the stack's
being used by another instruction (like a call).
This can only result in tears...
llvm-svn: 44037
2007-11-13 00:44:25 +00:00
Anton Korobeynikov
bfb139ec93
Completely forgot, that we have some debug information emission on PPC. This should fix
...
some regressions on ppc nightly tests.
llvm-svn: 44029
2007-11-12 23:36:13 +00:00
Bruno Cardoso Lopes
b439132d16
Added JumpTable support
...
Fixed some AsmPrinter issues
Added GLOBAL_OFFSET_TABLE Node handle.
llvm-svn: 44024
2007-11-12 19:49:57 +00:00
Ted Kremenek
e33ba16368
Added versions of ReadPtr that takes an explicit SerializedPtrID. This allows
...
clients of the Deserializer to read the pointer ID before they are ready
to deserialize the object (which can mean registering a pointer reference
with the backpatcher).
Changed some methods that took an argument "SerializedPtrID" to "const SerializedPtrID&" (pass-by-reference). This is to accommodate a future
revision of SerializedPtrID where it may be much fatter than an unsigned
integer.
llvm-svn: 44021
2007-11-12 19:11:15 +00:00
Owen Anderson
c520c4b325
Break critical edges coming into blocks with PHI nodes.
...
llvm-svn: 44019
2007-11-12 17:27:27 +00:00
Owen Anderson
933b5b7e62
Add a flag for indirect branch instructions.
...
Target maintainers: please check that the instructions for your target are correctly marked.
llvm-svn: 44012
2007-11-12 07:39:39 +00:00
Evan Cheng
be51f28e2b
Refactor some code.
...
llvm-svn: 44010
2007-11-12 06:35:08 +00:00
Owen Anderson
a1cd45213d
As Chris and Evan pointed out, BreakCriticalMachineEdges doesn't really need
...
to be a pass of its own. Instead, move it out into a helper method.
llvm-svn: 44002
2007-11-12 01:05:09 +00:00
Anton Korobeynikov
0644bb865e
Clarify the meaning of '-2' register number
...
llvm-svn: 43998
2007-11-11 19:53:50 +00:00
Anton Korobeynikov
4edfea438a
Use TableGen to emit information for dwarf register numbers.
...
This makes DwarfRegNum to accept list of numbers instead.
Added three different "flavours", but only slightly tested on x86-32/linux.
Please check another subtargets if possible,
llvm-svn: 43997
2007-11-11 19:50:10 +00:00
Dale Johannesen
b988e7e8cd
Add CCAssignToStackABISizeAlign for convenience in
...
dealing with types whose size & alignment are
different on different subtargets. Use it for x86 f80.
llvm-svn: 43988
2007-11-10 22:07:15 +00:00
Ted Kremenek
195c478e1b
Updated method signature to conform with the typedef in the method prototype.
...
llvm-svn: 43982
2007-11-10 19:19:32 +00:00
Arnold Schwaighofer
d2c16ff905
Update tailcall code to include inline attribute operand for memcpy.
...
llvm-svn: 43978
2007-11-10 10:48:01 +00:00
Ted Kremenek
55e30be8ec
Added "random access" to the Deserializer to allow a client to jump to any
...
serialized block in the bitstream, including a block in an entirely different
nesting than the current block. This is useful for deserializing objects from
a bitstream in an order different from the order that they were serialized.
llvm-svn: 43973
2007-11-10 02:02:34 +00:00
Hartmut Kaiser
67297144ab
Fixed a strange construct. Please review.
...
llvm-svn: 43960
2007-11-09 19:59:00 +00:00
Evan Cheng
fb13fd6f93
Unbreak x86-64 jumptable.
...
llvm-svn: 43955
2007-11-09 19:11:23 +00:00
Anton Korobeynikov
5db5e352b9
Silence a warning
...
llvm-svn: 43954
2007-11-09 19:06:14 +00:00
Dale Johannesen
dfb85c7831
Revert previous rewrite per chris's comments.
...
llvm-svn: 43950
2007-11-09 18:07:11 +00:00
Chris Lattner
f9c0fd7488
Tighten up a check for folding away loads from (newly constant) globals. This
...
fixes a crash on Transforms/GlobalOpt/2007-11-09-GEP-GEP-Crash.ll and
rdar://5585488.
llvm-svn: 43949
2007-11-09 17:33:02 +00:00
Duncan Sands
e795efea5b
Move MinAlign to MathExtras.h.
...
llvm-svn: 43944
2007-11-09 13:41:39 +00:00
Anton Korobeynikov
550b98e147
Fix indent
...
llvm-svn: 43941
2007-11-09 12:34:20 +00:00
Anton Korobeynikov
98638aede6
Forget to commit users part of value mapper interface
...
llvm-svn: 43940
2007-11-09 12:27:04 +00:00
Anton Korobeynikov
8eeca1c252
And delete this one
...
llvm-svn: 43939
2007-11-09 12:22:04 +00:00
Duncan Sands
e7a9ac929f
Fix some load/store logic that would be wrong for
...
apints on big-endian machines if the bitwidth is
not a multiple of 8. Introduce a new helper,
MVT::getStoreSizeInBits, and use it.
llvm-svn: 43934
2007-11-09 08:57:19 +00:00
Duncan Sands
bab9dc9433
Add terminating newline.
...
llvm-svn: 43933
2007-11-09 08:30:21 +00:00
Evan Cheng
797d56ff17
Much improved pic jumptable codegen:
...
Then:
call "L1$pb"
"L1$pb":
popl %eax
...
LBB1_1: # entry
imull $4, %ecx, %ecx
leal LJTI1_0-"L1$pb"(%eax), %edx
addl LJTI1_0-"L1$pb"(%ecx,%eax), %edx
jmpl *%edx
.align 2
.set L1_0_set_3,LBB1_3-LJTI1_0
.set L1_0_set_2,LBB1_2-LJTI1_0
.set L1_0_set_5,LBB1_5-LJTI1_0
.set L1_0_set_4,LBB1_4-LJTI1_0
LJTI1_0:
.long L1_0_set_3
.long L1_0_set_2
Now:
call "L1$pb"
"L1$pb":
popl %eax
...
LBB1_1: # entry
addl LJTI1_0-"L1$pb"(%eax,%ecx,4), %eax
jmpl *%eax
.align 2
.set L1_0_set_3,LBB1_3-"L1$pb"
.set L1_0_set_2,LBB1_2-"L1$pb"
.set L1_0_set_5,LBB1_5-"L1$pb"
.set L1_0_set_4,LBB1_4-"L1$pb"
LJTI1_0:
.long L1_0_set_3
.long L1_0_set_2
llvm-svn: 43924
2007-11-09 01:32:10 +00:00
Evan Cheng
f14006f4d6
Didn't mean to check these in.
...
llvm-svn: 43923
2007-11-09 01:28:33 +00:00
Evan Cheng
1bf166312b
Bug fix. Passive nodes are not in SUnitMap.
...
llvm-svn: 43922
2007-11-09 01:27:11 +00:00
Dale Johannesen
04fd82088e
Rewrite Dwarf number handling per review comments.
...
llvm-svn: 43918
2007-11-09 00:47:10 +00:00
Ted Kremenek
1d9406c1ca
Updated Deserializer class to provide more information about the current
...
block that is being visited in the bitstream. The client can also now
skip blocks before reading them, and query the current abbreviation number
as seen from the perspective of the Deserializer. This allows the client
to be more interactive in the deserialization process (if they so choose).
llvm-svn: 43916
2007-11-09 00:43:51 +00:00
Owen Anderson
65d2fcdd2a
This preserves critical edge breaking.
...
llvm-svn: 43911
2007-11-08 22:23:57 +00:00
Owen Anderson
3bc8124a66
Make BreakCriticalMachineEdges available as a pass that can be depended on.
...
llvm-svn: 43910
2007-11-08 22:20:23 +00:00
Ted Kremenek
67135ebaff
Added typedef "SerializedPtrID" to represent the pointer handle written to disk
...
instead of just using "unsigned". This gives us more flexibility in changing
the definition of the handle later, and is more self-documenting.
Added tracking of block stack in the Deserializer. Now clients can query
if they are still within a block using the methods GetCurrentBlockLocation()
and FinishedBlock().
llvm-svn: 43903
2007-11-08 19:50:46 +00:00
Andrew Lenharth
19ca5c7021
Better check
...
llvm-svn: 43897
2007-11-08 18:45:15 +00:00
Andrew Lenharth
8cf11aa330
Fix PR1780
...
llvm-svn: 43893
2007-11-08 17:39:28 +00:00
Lauro Ramos Venancio
f6a67bf700
[ARM] Implement __builtin_thread_pointer.
...
llvm-svn: 43892
2007-11-08 17:20:05 +00:00
Evan Cheng
ece4c68b82
If both parts of smul_lohi, etc. are used, don't simplify. If only one part is used, try simplify it.
...
llvm-svn: 43888
2007-11-08 09:25:29 +00:00
Owen Anderson
0be8c1dafe
Add the majority of machine-level critical edge breaking pass. Most of this was written by Fernando, cleanup and updating to TOT by me.
...
This still needs a bit of work, particularly to handle jump tables properly.
llvm-svn: 43885
2007-11-08 07:55:43 +00:00
Owen Anderson
bfbc12973d
Take another stab at getting isLiveIn() and isLiveOut() right.
...
llvm-svn: 43869
2007-11-08 01:32:45 +00:00
Owen Anderson
9d86ef12c8
Bring UsedBlocks back. StrongPHIElimination needs this information.
...
llvm-svn: 43866
2007-11-08 01:20:48 +00:00
Dale Johannesen
1b9de4dd6f
Complete conditionalization of Dwarf reg numbers.
...
Would somebody not on Darwin please make sure this
doesn't break anything. Exception handling failures
would be the most likely symptom.
llvm-svn: 43844
2007-11-07 21:48:35 +00:00
Ted Kremenek
81ad944c94
Implemented generic serialization of APFloat.
...
llvm-svn: 43829
2007-11-07 18:39:22 +00:00
Ted Kremenek
cc88d37531
Implemented serialization of signed integers.
...
llvm-svn: 43828
2007-11-07 18:24:34 +00:00
Evan Cheng
e742ee1dbe
Simplify my (il)logic.
...
llvm-svn: 43819
2007-11-07 08:08:25 +00:00
Owen Anderson
c6a5387d09
Add some more of StrongPHIElim.
...
llvm-svn: 43805
2007-11-07 05:17:15 +00:00
Dale Johannesen
fbe69d2cd6
Interchange Dwarf numbers of ESP and EBP on x86 Darwin.
...
Much improvement in exception handling.
llvm-svn: 43794
2007-11-07 00:25:05 +00:00
Ted Kremenek
bf75685321
Serializer no longer automatically emits a root-level block in the bitstream.
...
llvm-svn: 43784
2007-11-06 22:22:25 +00:00
Ted Kremenek
cd0c32865c
Augmented ReadPtr and ReadOwnedPtr to control whether or not a pointer is allowed to be backpatched
...
or can be registered with the deserializer to backpatch other pointers.
llvm-svn: 43783
2007-11-06 22:21:14 +00:00
Chris Lattner
581f006f5d
make smallptrset more const and type correct, which caught a few
...
minor bugs.
llvm-svn: 43782
2007-11-06 22:12:43 +00:00
Dan Gohman
ccfc028283
Remainder operations must be either integer or floating-point.
...
llvm-svn: 43781
2007-11-06 22:11:54 +00:00
Chris Lattner
8201a9bca0
fix const correctness, BB is const, so its predecessors are too
...
llvm-svn: 43780
2007-11-06 22:07:40 +00:00
Chris Lattner
cbad11e027
don't put erase or query for non-allocainst pointers in an set of allocainsts*'s
...
llvm-svn: 43779
2007-11-06 22:07:22 +00:00
Chris Lattner
d8515f8e80
Implement PR1777 by detecting dependent phis that
...
all compute the same value.
llvm-svn: 43777
2007-11-06 21:52:06 +00:00
Evan Cheng
dd71a5c37b
When the allocator rewrite a spill register with new virtual register, it replaces other operands of the same register. Watch out for situations where
...
only some of the operands are sub-register uses.
llvm-svn: 43776
2007-11-06 21:12:10 +00:00
Duncan Sands
f042e862fd
At the point of calculating the shift amount, the
...
type of SV has changed from what it originally was.
However we need the store width of the original.
llvm-svn: 43775
2007-11-06 20:39:11 +00:00
Ted Kremenek
e344bbbe84
Renamed "Flush()" to "FlushRecord()".
...
llvm-svn: 43772
2007-11-06 19:49:50 +00:00
Ted Kremenek
d015c7b4fd
Added support for processing abbreviations in the Deserializer.
...
Added some #ifdef-controlled messages for debugging backpatching.
llvm-svn: 43771
2007-11-06 19:49:16 +00:00
Evan Cheng
d5d59ad634
First step towards moving the coalescer to priority_queue based machinery.
...
llvm-svn: 43764
2007-11-06 08:52:21 +00:00
Evan Cheng
92d23e5204
Fix a bug where a def use operand isn't being detected as a sub-register use.
...
llvm-svn: 43763
2007-11-06 08:50:44 +00:00
Evan Cheng
2dbffa4e76
Add pseudo dependency to force two-address instruction to be scheduled after
...
other uses. There was a overly restricted check that prevented some obvious
cases.
llvm-svn: 43762
2007-11-06 08:44:59 +00:00
Chris Lattner
0fc613b85d
Fix PR1774 and BasicAA/2007-11-05-SizeCrash.ll
...
llvm-svn: 43756
2007-11-06 05:58:42 +00:00
Owen Anderson
d378cea030
Add a few comments.
...
llvm-svn: 43755
2007-11-06 05:26:02 +00:00
Owen Anderson
eb964eb2c8
DomForest is a forest of registers, not instructions.
...
llvm-svn: 43754
2007-11-06 05:22:43 +00:00
Owen Anderson
a9057f0b97
StrongPHIElimination requires LiveVariables.
...
llvm-svn: 43751
2007-11-06 04:49:43 +00:00
Bruno Cardoso Lopes
87bb032c05
Better processor definition
...
llvm-svn: 43749
2007-11-06 03:15:20 +00:00
Chris Lattner
362709dff1
wrap long lines
...
llvm-svn: 43745
2007-11-06 01:15:27 +00:00
Dan Gohman
08143e397d
Add support for vector remainder operations.
...
llvm-svn: 43744
2007-11-05 23:35:22 +00:00
Dan Gohman
4decbc5002
Fix an abort in instcombine when folding creates a vector rem instruction.
...
llvm-svn: 43743
2007-11-05 23:16:33 +00:00
Rafael Espindola
fa0df55bdd
Move the LowerMEMCPY and LowerMEMCPYCall to a common place.
...
Thanks for the suggestions Bill :-)
llvm-svn: 43742
2007-11-05 23:12:20 +00:00
Ted Kremenek
4556582e2b
Added support in serializer and deserializer to create arbitrary blocks.
...
Added detection of end-of-stream in deserializer.
llvm-svn: 43736
2007-11-05 21:36:35 +00:00
Dale Johannesen
4646aa3e33
Make labels work in asm blocks; allow labels as
...
parameters. Rename ValueRefList to ParamList
in AsmParser, since its only use is for parameters.
llvm-svn: 43734
2007-11-05 21:20:28 +00:00
Ted Kremenek
e7fb505f58
Added default creation of root-level block by bitstream serializer.
...
llvm-svn: 43732
2007-11-05 20:47:27 +00:00
Devang Patel
b98d2050a2
If a value is incoming from outside the loop then the value does not need remapping and the value is never tracked through LastValueMap.
...
llvm-svn: 43728
2007-11-05 19:32:30 +00:00
Lauro Ramos Venancio
1a30c18e88
[ARM] Fix code generation for:
...
static __thread struct {
int a;
int b;
} teste = {0, 0};
llvm-svn: 43722
2007-11-05 18:33:37 +00:00
Duncan Sands
f7ae8bd090
Don't output ABI size padding twice. By using the store
...
size for the field we get ABI padding automatically, so
no need to put it in again when we emit the field.
llvm-svn: 43720
2007-11-05 18:03:02 +00:00
Evan Cheng
8bb30184a8
Move SimpleRegisterCoalescing.h to lib/CodeGen since there is now a common
...
register coalescer interface: RegisterCoalescing.
llvm-svn: 43714
2007-11-05 17:41:38 +00:00
Evan Cheng
9337929aae
Use movups to spill / restore SSE registers on targets where stacks alignment is
...
less than 16. This is a temporary solution until dynamic stack alignment is
implemented.
llvm-svn: 43703
2007-11-05 07:30:01 +00:00
Evan Cheng
17b0e3e1ae
Skip over deleted val#'s.
...
llvm-svn: 43700
2007-11-05 06:46:45 +00:00
Evan Cheng
a406b47f14
Handle cases where a register and one of its super-register are both marked as
...
defined on the same instruction. This fixes PR1767.
llvm-svn: 43699
2007-11-05 03:11:55 +00:00
Bruno Cardoso Lopes
3e0d030dad
Added support for PIC code with "explicit relocations" *only*.
...
Removed all macro code for PIC (goodbye "la").
Support tested with shootout bench.
llvm-svn: 43697
2007-11-05 03:02:32 +00:00
Gordon Henriksen
2ed067a0d9
Deleting redundant copy of block extractor pass. See also PR1775.
...
llvm-svn: 43694
2007-11-05 01:54:05 +00:00
Evan Cheng
a8044084ac
Fix PR1187.
...
llvm-svn: 43692
2007-11-05 00:59:10 +00:00
Duncan Sands
f07fa24289
If a long double is in a packed struct, it may be
...
that there is no padding.
llvm-svn: 43691
2007-11-05 00:35:07 +00:00
Duncan Sands
283207a71c
Eliminate the remaining uses of getTypeSize. This
...
should only effect x86 when using long double. Now
12/16 bytes are output for long double globals (the
exact amount depends on the alignment). This brings
globals in line with the rest of LLVM: the space
reserved for an object is now always the ABI size.
One tricky point is that only 10 bytes should be
output for long double if it is a field in a packed
struct, which is the reason for the additional
argument to EmitGlobalConstant.
llvm-svn: 43688
2007-11-05 00:04:43 +00:00
Owen Anderson
eea82746b3
Another step of stronger PHI elimination down.
...
llvm-svn: 43684
2007-11-04 22:33:26 +00:00
Gordon Henriksen
35f398a9cd
Deleting -emitbitcode option which did nothing.
...
llvm-svn: 43683
2007-11-04 20:28:31 +00:00
Chris Lattner
9329e780cd
Fix PR1761 by not printing (rip) suffix when in -static mode.
...
Evan, please review this.
llvm-svn: 43680
2007-11-04 19:23:28 +00:00
Nick Lewycky
d954dcd138
Fix crash before main on ppc/linux with static constructors. PR1771
...
llvm-svn: 43676
2007-11-04 17:32:10 +00:00
Gordon Henriksen
d568767ecb
Finishing initial docs for all transformations in Passes.html.
...
Also cleaned up some comments in source files.
llvm-svn: 43674
2007-11-04 16:15:04 +00:00
Duncan Sands
399d97987b
Change uses of getTypeSize to getABITypeSize, getTypeStoreSize
...
or getTypeSizeInBits as appropriate in ScalarReplAggregates.
The right change to make was not always obvious, so it would
be good to have an sroa guru review this. While there I noticed
some bugs, and fixed them: (1) arrays of x86 long double have
holes due to alignment padding, but this wasn't being spotted
by HasStructPadding (renamed to HasPadding). The same goes
for arrays of oddly sized ints. Vectors also suffer from this,
in fact the problem for vectors is much worse because basic
vector assumptions seem to be broken by vectors of type with
alignment padding. I didn't try to fix any of these vector
problems. (2) The code for extracting smaller integers from
larger ones (in the "int union" case) was wrong on big-endian
machines for integers with size not a multiple of 8, like i1.
Probably this is impossible to hit via llvm-gcc, but I fixed
it anyway while there and added a testcase. I also got rid of
some trailing whitespace and changed a function name which
had an obvious typo in it.
llvm-svn: 43672
2007-11-04 14:43:57 +00:00
Evan Cheng
5c1b044899
If an interval is being undone clear its preference as well since the source interval may have been undone as well.
...
llvm-svn: 43670
2007-11-04 08:32:21 +00:00