Anton Korobeynikov
262a397978
Fix code emission for conditional branches.
...
Patch by Collin Winter!
llvm-svn: 70898
2009-05-04 19:10:38 +00:00
Dan Gohman
f8f167320d
Use true instead of 1 for a boolean value. And fix a copy+pasto
...
in a comment.
llvm-svn: 70882
2009-05-04 17:25:21 +00:00
Dan Gohman
83dfa97326
Trim unnecessary #includes.
...
llvm-svn: 70880
2009-05-04 17:11:06 +00:00
Duncan Sands
4c7021febf
Teach capture tracking that readonly functions can
...
only capture their arguments by returning them or
throwing an exception or not based on the argument
value. Patch essentially by Frits van Bommel.
llvm-svn: 70876
2009-05-04 16:50:29 +00:00
Chris Lattner
84cf4d62a8
fix some problems spotted by Duncan and Nicolas Geoffray
...
llvm-svn: 70872
2009-05-04 16:29:24 +00:00
Argyrios Kyrtzidis
fb958c2b09
-Remove the DwarfWriter::RecordSourceLine calls from the instruction selectors.
...
-Depend on DebugLocs for source line info.
(Comes with Regression-Be-Gone(tm))
llvm-svn: 70871
2009-05-04 16:23:49 +00:00
Evan Cheng
9df9768ee5
Make sure to color with only allocatable registers for the specific register class.
...
llvm-svn: 70821
2009-05-04 03:30:11 +00:00
Chris Lattner
6807ddd3d9
* Sink 4 duplicates of edge threading validity checks and DOUT prints into
...
ThreadEdge directly. This shares the code, but is just a refactoring.
* Make JumpThreading compute the set of loop headers and avoid threading
across them. This prevents jump threading from forming irreducible
loops (goodness) but also prevents it from threading in other cases that
are beneficial (see the comment above FindFunctionBackedges).
llvm-svn: 70820
2009-05-04 02:28:08 +00:00
Chris Lattner
b07d558841
Factor loop backedge finding out of CodeGenPrepare into a new
...
FindFunctionBackedges function.
llvm-svn: 70819
2009-05-04 02:25:58 +00:00
Evan Cheng
bb12bac53b
The stack slots which share the same stack slot after coloring can, but do not have to, use the same register. In fact, they each may have different register class requirements.
...
llvm-svn: 70815
2009-05-04 00:24:50 +00:00
Argyrios Kyrtzidis
e68261749e
Revert r70803 for now, it causes a regression.
...
llvm-svn: 70811
2009-05-03 23:27:19 +00:00
Argyrios Kyrtzidis
bb6e4d027c
-Remove the DwarfWriter::RecordSourceLine calls from the instruction selectors.
...
-Depend on DebugLocs for source line info.
llvm-svn: 70803
2009-05-03 22:03:35 +00:00
Evan Cheng
a64d6b8822
Typo.
...
llvm-svn: 70792
2009-05-03 19:10:11 +00:00
Evan Cheng
28aa6c41d1
In some rare cases, the register allocator can spill registers but end up not utilizing registers at all. The fundamental problem is linearscan's backtracking can end up freeing more than one allocated registers. However, reloads and restores might be folded into uses / defs and freed registers might not be used at all.
...
VirtRegMap keeps track of allocations so it knows what's not used. As a horrible hack, the stack coloring can color spill slots with *free* registers. That is, it replace reload and spills with copies from and to the free register. It unfold instructions that load and store the spill slot and replace them with register using variants.
Not yet enabled. This is part 1. More coming.
llvm-svn: 70787
2009-05-03 18:32:42 +00:00
Anton Korobeynikov
df33e5a803
Handle implicit zext in a better way. Shamelessly stolen from x86 backend.
...
Thanks for Dan Gohman for suggestion!
llvm-svn: 70782
2009-05-03 15:50:18 +00:00
Anton Korobeynikov
15587901c3
Fix typo
...
llvm-svn: 70770
2009-05-03 13:19:57 +00:00
Anton Korobeynikov
46a92ec4d6
Update due to mainline API change
...
llvm-svn: 70769
2009-05-03 13:19:42 +00:00
Anton Korobeynikov
13ed1c4514
Add TODO list :)
...
llvm-svn: 70768
2009-05-03 13:19:24 +00:00
Anton Korobeynikov
8988fea464
Make handling of conditional stuff much more straightforward
...
llvm-svn: 70767
2009-05-03 13:19:09 +00:00
Anton Korobeynikov
d8c42b2dee
Temporary disable imm patterns for cmp. Actually, all cmp-related stuff (select_cc, setcc, br_cc). needs to be rethought
...
llvm-svn: 70766
2009-05-03 13:18:50 +00:00
Anton Korobeynikov
e6c8cc6c51
Expand divisions into libcalls
...
llvm-svn: 70765
2009-05-03 13:18:33 +00:00
Anton Korobeynikov
34d22f34a8
Properly handle sdiv / udiv / srem / urem libcalls
...
llvm-svn: 70764
2009-05-03 13:18:16 +00:00
Anton Korobeynikov
54bbd77498
Custom lower SIGN_EXTEND
...
llvm-svn: 70763
2009-05-03 13:17:49 +00:00
Anton Korobeynikov
9103796e69
Some eye-candy
...
llvm-svn: 70762
2009-05-03 13:17:31 +00:00
Anton Korobeynikov
c0ea294fb9
Print function header / footer
...
llvm-svn: 70761
2009-05-03 13:17:11 +00:00
Anton Korobeynikov
f4b4812c83
Fix printing: je => jeq
...
llvm-svn: 70760
2009-05-03 13:16:54 +00:00
Anton Korobeynikov
4b5232c990
Add 8bit shifts
...
llvm-svn: 70759
2009-05-03 13:16:37 +00:00
Anton Korobeynikov
d0e3939bdf
Handle logical shift right (at least I hope so :) )
...
llvm-svn: 70758
2009-05-03 13:16:17 +00:00
Anton Korobeynikov
7dd27f2e41
Handle anyext
...
llvm-svn: 70757
2009-05-03 13:15:57 +00:00
Anton Korobeynikov
baf9278166
Expand all sorts of indirect branches
...
llvm-svn: 70755
2009-05-03 13:15:40 +00:00
Anton Korobeynikov
806b8efb5e
Add InsertBranch() hook for tail mergeing
...
llvm-svn: 70754
2009-05-03 13:15:22 +00:00
Anton Korobeynikov
b97b120cf9
Implement bswap
...
llvm-svn: 70753
2009-05-03 13:15:03 +00:00
Anton Korobeynikov
cebc97d79c
Properly handle ExternalSymbol's
...
llvm-svn: 70752
2009-05-03 13:14:46 +00:00
Anton Korobeynikov
9b84c6b633
Expand muls (all mulls!) to libcalls for now
...
llvm-svn: 70751
2009-05-03 13:14:25 +00:00
Anton Korobeynikov
7f560f113d
Proper name 16 bit libcalls
...
llvm-svn: 70750
2009-05-03 13:14:08 +00:00
Anton Korobeynikov
b4da45ecd8
Add libcall expansion for 16 and 128 bit muls
...
llvm-svn: 70749
2009-05-03 13:13:51 +00:00
Anton Korobeynikov
80d0bdc789
Provide addc and subc
...
llvm-svn: 70748
2009-05-03 13:13:34 +00:00
Anton Korobeynikov
1f80bde7ad
Add left shift
...
llvm-svn: 70747
2009-05-03 13:13:17 +00:00
Anton Korobeynikov
d9b4143e47
Add direct branch
...
llvm-svn: 70746
2009-05-03 13:12:58 +00:00
Anton Korobeynikov
c5a13f6a3f
It's error-prone to maintain two separate variants of asmprinting stuff, one of which is even used. Drop second (aka 'intel') variant of operands. It can be added later, if needed.
...
llvm-svn: 70745
2009-05-03 13:12:37 +00:00
Anton Korobeynikov
f7943f8df6
Lower select with custom inserted and make condjumps generic
...
llvm-svn: 70744
2009-05-03 13:12:23 +00:00
Anton Korobeynikov
d55d6586ae
Add first draft for conditions, conditional branches, etc
...
llvm-svn: 70743
2009-05-03 13:12:06 +00:00
Anton Korobeynikov
2b8085a3f5
Hanle i8 returns
...
llvm-svn: 70742
2009-05-03 13:11:48 +00:00
Anton Korobeynikov
67b1a5c20b
Small tweaking
...
llvm-svn: 70741
2009-05-03 13:11:35 +00:00
Anton Korobeynikov
c428224a89
Add prologue/epilogue emission. Fix frame pointer handling.
...
llvm-svn: 70740
2009-05-03 13:11:20 +00:00
Anton Korobeynikov
10d199fa80
Add code for save/restore of callee-saved registers
...
llvm-svn: 70739
2009-05-03 13:11:04 +00:00
Anton Korobeynikov
6a63537ff0
Two more hooks for RA and FP registers
...
llvm-svn: 70738
2009-05-03 13:10:40 +00:00
Anton Korobeynikov
06d645c199
Proper handle loading of effective address of stack slot stuff
...
llvm-svn: 70737
2009-05-03 13:10:26 +00:00
Anton Korobeynikov
88cc152a78
Match frame indexes
...
llvm-svn: 70736
2009-05-03 13:10:11 +00:00
Anton Korobeynikov
e7639579a3
First draft of stack slot loads / stores lowering
...
llvm-svn: 70735
2009-05-03 13:09:57 +00:00
Anton Korobeynikov
1f9d4dc64d
Reverse order of memory arguments
...
llvm-svn: 70734
2009-05-03 13:09:40 +00:00
Anton Korobeynikov
f3fadcbbda
Remove bogus pattern
...
llvm-svn: 70733
2009-05-03 13:09:24 +00:00
Anton Korobeynikov
47c1450013
Correct asmprinting of memory operands
...
llvm-svn: 70732
2009-05-03 13:09:10 +00:00
Anton Korobeynikov
eea3a58bbf
Match wrapper node for address
...
llvm-svn: 70731
2009-05-03 13:08:51 +00:00
Anton Korobeynikov
cd06be1d13
Add lowering for global address nodes. Not pretty efficient though.
...
llvm-svn: 70730
2009-05-03 13:08:33 +00:00
Anton Korobeynikov
e02a674ee0
Some early full call lowering draft for direct calls
...
llvm-svn: 70729
2009-05-03 13:08:13 +00:00
Anton Korobeynikov
b396742d02
Add call frame setup instruction elimination and lowerid for bunch of call-related stuff.
...
llvm-svn: 70728
2009-05-03 13:07:54 +00:00
Anton Korobeynikov
4fa710b300
Add CALL lowering.
...
llvm-svn: 70727
2009-05-03 13:07:31 +00:00
Anton Korobeynikov
582d2a335b
Add bunch of mem-whatever patterns
...
llvm-svn: 70726
2009-05-03 13:07:10 +00:00
Anton Korobeynikov
d14ee9eeae
Add bunch of reg-mem inst patterns
...
llvm-svn: 70725
2009-05-03 13:06:46 +00:00
Anton Korobeynikov
7b7a743ea8
Add normal and trunc stores
...
llvm-svn: 70724
2009-05-03 13:06:26 +00:00
Anton Korobeynikov
91359dcc3b
Basic support for mem=>reg moves
...
llvm-svn: 70723
2009-05-03 13:06:03 +00:00
Anton Korobeynikov
83122b7ef0
Add 8-bit insts. zext behaviour is not modelled yet
...
llvm-svn: 70722
2009-05-03 13:05:42 +00:00
Anton Korobeynikov
1c0af22261
Add 8-bit regclass and pattern for sext_inreg
...
llvm-svn: 70721
2009-05-03 13:05:22 +00:00
Anton Korobeynikov
d74b7ab46d
Add pattern for OR
...
llvm-svn: 70720
2009-05-03 13:05:00 +00:00
Anton Korobeynikov
aff90ae4f2
Add reg-imm variants
...
llvm-svn: 70719
2009-05-03 13:04:41 +00:00
Anton Korobeynikov
ff4332fcde
Add hint to nop
...
llvm-svn: 70718
2009-05-03 13:04:23 +00:00
Anton Korobeynikov
a46b46fa46
Add more instructions
...
llvm-svn: 70717
2009-05-03 13:04:06 +00:00
Anton Korobeynikov
1921caf185
Cleanup
...
llvm-svn: 70716
2009-05-03 13:03:50 +00:00
Anton Korobeynikov
262c4b9ff9
Add dummy lowering for shifts
...
llvm-svn: 70715
2009-05-03 13:03:33 +00:00
Anton Korobeynikov
f21d1d0d2c
We don't have any div at all - thus mark it as expensive
...
llvm-svn: 70714
2009-05-03 13:03:14 +00:00
Anton Korobeynikov
df71fb8a3a
We're not going to spend 100% of time in interrupts, do we? :)
...
llvm-svn: 70713
2009-05-03 13:02:57 +00:00
Anton Korobeynikov
627e169e8e
Add simple reg-reg add.
...
llvm-svn: 70712
2009-05-03 13:02:39 +00:00
Anton Korobeynikov
be8018ff1d
gas uses lower letter for register names
...
llvm-svn: 70711
2009-05-03 13:02:22 +00:00
Anton Korobeynikov
e9e0353b21
Add code enough for emission of reg-reg and reg-imm moves. This allows us to compile "ret i16 0" properly!
...
llvm-svn: 70710
2009-05-03 13:02:04 +00:00
Anton Korobeynikov
8b763cb6ec
Add function body printing routine
...
llvm-svn: 70709
2009-05-03 13:01:41 +00:00
Anton Korobeynikov
5f8e2ee553
Add 'msp430' target triple recognizer
...
llvm-svn: 70708
2009-05-03 13:01:23 +00:00
Anton Korobeynikov
f5317831da
Make emit{Prologue,Epilogue}() noop for now
...
llvm-svn: 70707
2009-05-03 13:01:04 +00:00
Anton Korobeynikov
57d55e96cd
Add callee-saved regs & reg classes getter hooks
...
llvm-svn: 70706
2009-05-03 13:00:46 +00:00
Anton Korobeynikov
70dbb3eb2f
Add simple FP indicator for given function hook
...
llvm-svn: 70705
2009-05-03 13:00:28 +00:00
Anton Korobeynikov
4c91b3a6f2
Provide set of reserved registers
...
llvm-svn: 70704
2009-05-03 13:00:11 +00:00
Anton Korobeynikov
ebab62b827
Add proper ISD::RET lowering
...
llvm-svn: 70703
2009-05-03 12:59:50 +00:00
Anton Korobeynikov
e74a06c068
Add first draft of MSP430 calling convention stuff and draft of ISD::FORMAL_ARGUMENTS node lowering.
...
llvm-svn: 70702
2009-05-03 12:59:33 +00:00
Anton Korobeynikov
b85740bf76
Fix register names, fix register allocation order, handle frame pointer.
...
llvm-svn: 70701
2009-05-03 12:59:16 +00:00
Anton Korobeynikov
5af68b43bc
Clearify the usage and add some debug stuff
...
llvm-svn: 70700
2009-05-03 12:58:58 +00:00
Anton Korobeynikov
840e251a16
Cleanup
...
llvm-svn: 70699
2009-05-03 12:58:40 +00:00
Anton Korobeynikov
372921c7be
Add cmake script. No idea whether it works or not :)
...
llvm-svn: 70698
2009-05-03 12:58:22 +00:00
Anton Korobeynikov
0eec6e6c0a
Add a note
...
llvm-svn: 70697
2009-05-03 12:58:05 +00:00
Anton Korobeynikov
be51fd1388
Typo
...
llvm-svn: 70695
2009-05-03 12:57:47 +00:00
Anton Korobeynikov
d49e584da5
Dummy MSP430 backend
...
llvm-svn: 70694
2009-05-03 12:57:15 +00:00
Argyrios Kyrtzidis
a034549d67
-Move the DwarfWriter::ValidDebugInfo check to a static DIDescriptor::ValidDebugInfo
...
-Create DebugLocs without the need to have a DwarfWriter around
llvm-svn: 70682
2009-05-03 08:50:41 +00:00
Dan Gohman
8e4b9e586b
Revert r70645 for now; it's causing a variety of regressions.
...
llvm-svn: 70661
2009-05-03 05:46:20 +00:00
Nick Lewycky
01b22399ef
Revert r70630. Go back to appending ".b" to internal globals when shrinking
...
them to bool.
llvm-svn: 70653
2009-05-03 03:49:08 +00:00
Dan Gohman
7d98736ca6
Convert ScalarEvolution to use CallbackVH for its internal map. This
...
makes ScalarEvolution::deleteValueFromRecords, and it's code that
subtly needed to be called before ReplaceAllUsesWith, unnecessary.
It also makes ValueDeletionListener unnecessary.
llvm-svn: 70645
2009-05-02 21:19:20 +00:00
Dan Gohman
dc96a23780
Apply Jeffrey Yasskin's CallbackVH patch, with minor tweaks from me
...
to make the copy constructor and destructor protected, and corresponding
adjustments to the unittests.
llvm-svn: 70644
2009-05-02 21:10:48 +00:00
Dan Gohman
7c5f68dd5c
The second argument to RecursivelyDeleteTriviallyDeadInstructions has
...
a default value, and will hopefully be going away soon.
llvm-svn: 70642
2009-05-02 20:22:10 +00:00
Dan Gohman
a79cce4aef
Previously, RecursivelyDeleteDeadInstructions provided an option
...
of returning a list of pointers to Values that are deleted. This was
unsafe, because the pointers in the list are, by nature of what
RecursivelyDeleteDeadInstructions does, always dangling. Replace this
with a simple callback mechanism. This may eventually be removed if
all clients can reasonably be expected to use CallbackVH.
Use this to factor out the dead-phi-cycle-elimination code from LSR
utility function, and generalize it to use the
RecursivelyDeleteTriviallyDeadInstructions utility function.
This makes LSR more aggressive about eliminating dead PHI cycles;
adjust tests to either be less trivial or to simply expect fewer
instructions.
llvm-svn: 70636
2009-05-02 18:29:22 +00:00
Dan Gohman
9608880839
When ScalarEvolution is told to forget the trip count for a loop, have
...
it also forget any SCEVs associated with loop-header PHIs in the loop,
as they may be dependent on trip count information.
llvm-svn: 70633
2009-05-02 17:43:35 +00:00
Dan Gohman
cc3edfaa6c
Tell ScalarEvolution that the loop is being deleted before actually
...
deleting it. This will let ScalarEvolution be more complete about
updating its records.
llvm-svn: 70632
2009-05-02 17:29:26 +00:00
Nick Lewycky
3e85ff61b3
Don't append ".b" to the names of globals that are being shrunk to booleans.
...
llvm-svn: 70630
2009-05-02 16:21:50 +00:00
Dan Gohman
a4b28ca3c9
Don't split critical edges during the AddUsersIfInteresting phase
...
of LSR. This makes the AddUsersIfInteresting phase of LSR a pure
analysis instead of a phase that potentially does CFG modifications.
The conditions where this code would actually perform a split are
rare, and in the cases where it actually would do a split the split
is usually undone by CodeGenPrepare, and in cases where splits
actually survive into codegen, they appear to hurt more often than
they help.
llvm-svn: 70625
2009-05-02 05:36:01 +00:00
Chris Lattner
c6d561ed27
'The attached patch fixes an issue where llc -march=cpp fails with
...
"Invalid primitive type" on input containing the x86_fp80 type.'
Patch by Collin Winter!
llvm-svn: 70610
2009-05-01 23:54:26 +00:00
Dan Gohman
6aa1fd5065
Change the description string of the LoopInfo pass.
...
"Construction" makes it sound like a pass that might
modify the CFG to construct natural loops.
llvm-svn: 70580
2009-05-01 21:58:05 +00:00
Bob Wilson
da90bf9e40
Allow CONCAT_VECTORS nodes to be legal or have custom lowering for some targets.
...
Changes to take advantage of this will come later.
llvm-svn: 70560
2009-05-01 17:55:32 +00:00
Dan Gohman
d57099a9eb
Actually insert inserted instructions into the InsertedValues map.
...
llvm-svn: 70557
2009-05-01 17:13:31 +00:00
Dan Gohman
bdc33dc988
Make RequiresTypeConversion canonicalize the types before calling the
...
target hooks canLosslesslyBitCastTo and isTruncateFree. This allows
targets to avoid worrying about handling all combinations of integer
and pointer types.
llvm-svn: 70555
2009-05-01 17:07:43 +00:00
Dan Gohman
0dc2b769b0
When printing a SCEVUnknown with pointer type, don't print an
...
artificial "ptrtoint", as it tends to clutter up complicated
expressions. The cast operators now print both source and
destination types, which is usually sufficient.
llvm-svn: 70554
2009-05-01 17:02:22 +00:00
Dan Gohman
bc336eab6e
Short-circuit inttoptr-ptrtoint constant expressions; these aren't
...
always folded by the regular constant folder because it doesn't have
TargetData information.
llvm-svn: 70553
2009-05-01 17:00:00 +00:00
Dan Gohman
9dd3e99217
Minor whitespace fix.
...
llvm-svn: 70551
2009-05-01 16:56:32 +00:00
Dan Gohman
7eab4d2fa2
Fix an 80-column violation.
...
llvm-svn: 70550
2009-05-01 16:44:56 +00:00
Dan Gohman
24b592972d
When creating cast scevs, canonicalize the destination type. This
...
avoids duplicate scevs that differ only in type.
llvm-svn: 70549
2009-05-01 16:44:18 +00:00
Dan Gohman
a55fce998e
Fix some code to work if TargetLowering is not available.
...
llvm-svn: 70546
2009-05-01 16:29:14 +00:00
Bill Wendling
2da6a65b62
Simplify more code and add timer stuff.
...
llvm-svn: 70539
2009-05-01 08:40:06 +00:00
Bill Wendling
0bab670012
Simplify more code.
...
llvm-svn: 70537
2009-05-01 08:35:12 +00:00
Torok Edwin
63c28133ae
hasSCEV() was declared in ScalarEvolution.h, but never defined. This must have
...
gone lost during the pImpl conversion.
llvm-svn: 70536
2009-05-01 08:33:47 +00:00
Bill Wendling
662dfea32e
Simplify some code.
...
llvm-svn: 70534
2009-05-01 08:32:14 +00:00
Bill Wendling
2f01fd9bf1
Fix whitespace. It was confusing me.
...
llvm-svn: 70533
2009-05-01 08:25:13 +00:00
Evan Cheng
d6a780a181
Code clean up. Bye bye PhysRegTracker.
...
llvm-svn: 70524
2009-05-01 01:03:49 +00:00
Argyrios Kyrtzidis
123a0fb56f
Fix compilation for some targets other than x86.
...
llvm-svn: 70522
2009-04-30 23:50:26 +00:00
Argyrios Kyrtzidis
9956976b76
Make DebugLoc independent of DwarfWriter.
...
-Replace DebugLocTuple's Source ID with CompileUnit's GlobalVariable*
-Remove DwarfWriter::getOrCreateSourceID
-Make necessary changes for the above (fix callsites, etc.)
llvm-svn: 70520
2009-04-30 23:22:31 +00:00
Argyrios Kyrtzidis
ad07acf07a
Set FnEnd in JITEmitter::finishFunction to point strictly to the end of function's machine code.
...
Don't include memory allocated for global variables during relocations resolution.
llvm-svn: 70517
2009-04-30 23:01:58 +00:00
Jakob Stoklund Olesen
17d292db73
Join cross class copies using getCommonSubClass()
...
llvm-svn: 70513
2009-04-30 21:24:03 +00:00
Jakob Stoklund Olesen
bcb5d651a3
getCommonSubClass() - Calculate the largest common sub-class of two register
...
classes.
This is implemented as a function rather than a method on TargetRegisterClass
because it is symmetric in its arguments.
llvm-svn: 70512
2009-04-30 21:23:32 +00:00
Dan Gohman
6d5f693ede
Add some comments, and tidy up some whitespace.
...
llvm-svn: 70510
2009-04-30 20:48:53 +00:00
Dan Gohman
3c9f4f765c
Extend ScalarEvolution's getBackedgeTakenCount to be able to
...
compute an upper-bound value for the trip count, in addition to
the actual trip count. Use this to allow getZeroExtendExpr and
getSignExtendExpr to fold casts in more cases.
This may eventually morph into a more general value-range
analysis capability; there are certainly plenty of places where
more complete value-range information would allow more folding.
llvm-svn: 70509
2009-04-30 20:47:05 +00:00
Evan Cheng
a4c868f1d4
Add a smarter heuristic to determine when to coalesce a virtual register with a physical one. More specifically, it avoid tying a virtual register in the loop with a physical register defined / used outside the loop. When it determines it's not profitable, it will use the physical register as the allocation preference instead.
...
This is *not* turned on by default. Testing indicates this is just as likely to pessimize code. The main issue seems to be allocation preference doesn't work effectively. That will change once I've taught register allocator "swapping".
llvm-svn: 70503
2009-04-30 18:39:57 +00:00
Dan Gohman
25d21786d3
Don't try to mix integers and pointers in an icmp instruction
...
in getSCEVAtScope.
llvm-svn: 70495
2009-04-30 16:40:30 +00:00
Jay Foad
9768cabf4a
Move helper functions for optimizing division by constant into the APInt
...
class.
llvm-svn: 70488
2009-04-30 10:15:35 +00:00
Dan Gohman
8a0e27efb2
Set mayLoad on MOVZX32_NOREXrm8 too.
...
llvm-svn: 70466
2009-04-30 03:11:48 +00:00
Dan Gohman
fac9c52fd8
Fix ScalarEvolution::print to print a value for any Instruction with
...
a SCEVable type, not just integer types.
llvm-svn: 70463
2009-04-30 01:30:18 +00:00
Evan Cheng
b7d41a6680
Mark MOV8mr_NOREX and MOV8rm_NOREX as mayStore / mayLoad respectively.
...
llvm-svn: 70461
2009-04-30 00:58:57 +00:00
Chris Lattner
794fb5b4b3
fix a regression handling indirect results: these need to be considered
...
memory operands otherwise the writebacks get lost when the inline asm
doesn't otherwise have side effects. This fixes rdar://6839427, though
clang really shouldn't generate these anymore.
llvm-svn: 70455
2009-04-30 00:48:50 +00:00
Bill Wendling
68ac27094d
Fix the JIT bindings for ocaml.
...
llvm-svn: 70454
2009-04-30 00:43:39 +00:00
Chris Lattner
25991c4e7d
remove progname which is never set. PR4085
...
llvm-svn: 70453
2009-04-30 00:24:33 +00:00
Bill Wendling
40a162f75f
Instead of passing in an unsigned value for the optimization level, use an enum,
...
which better identifies what the optimization is doing. And is more flexible for
future uses.
llvm-svn: 70440
2009-04-29 23:29:43 +00:00
Bill Wendling
3f4c6171d1
Add support for a character after a command line option. Like '-Os'.
...
llvm-svn: 70437
2009-04-29 23:26:16 +00:00
Dale Johannesen
be38eaf1d4
Print correct instruction in dump.
...
llvm-svn: 70427
2009-04-29 22:57:20 +00:00
Nate Begeman
b407809122
Fix infinite recursion in the C++ code which handles movddup by making it unnecessary.
...
llvm-svn: 70425
2009-04-29 22:47:44 +00:00
Dan Gohman
63bab48951
Implement getSCEVAtScope for SCEV cast expressions.
...
llvm-svn: 70422
2009-04-29 22:29:01 +00:00
Dan Gohman
06aff30f01
Generalize the cast-of-addrec folding to handle folding of SCEVs like
...
(sext i8 {-128,+,1} to i64) to i64 {-128,+,1}, where the iteration
crosses from negative to positive, but is still safe if the trip
count is within range.
llvm-svn: 70421
2009-04-29 22:28:28 +00:00
Dan Gohman
8b1b8d5891
Reword and tidy up some comments.
...
llvm-svn: 70416
2009-04-29 22:01:05 +00:00
Jakob Stoklund Olesen
0bfaaea2a4
MachineInstr::isRegTiedTo{Use,Def}Operand can safely be made const.
...
llvm-svn: 70408
2009-04-29 20:57:16 +00:00
Dan Gohman
55befacc69
Include the source type in SCEV cast expression debug output, and
...
print sext, zext, and trunc, instead of signextend, zeroextend,
and truncate, respectively, for consistency with the main IR.
llvm-svn: 70405
2009-04-29 20:27:52 +00:00
Nate Begeman
e4dd5a96ba
Update comment, replace theoretically impossible check with an assert.
...
llvm-svn: 70391
2009-04-29 18:13:31 +00:00
Dale Johannesen
15486ddd95
Fix recent regression in gcc.dg/pr26719.c (6835035).
...
llvm-svn: 70386
2009-04-29 16:38:47 +00:00
Evan Cheng
62fdc300dd
spillPhysRegAroundRegDefsUses() may have invalidated iterators stored in fixed_ IntervalPtrs. Reset them.
...
llvm-svn: 70378
2009-04-29 07:16:34 +00:00
Nate Begeman
414534b3eb
Implement review feedback for vector shuffle work.
...
llvm-svn: 70372
2009-04-29 05:20:52 +00:00
Sanjiv Gupta
b1c777e865
Add a public method called getAddressSpace() to the GlobalAddressSDNode.
...
llvm-svn: 70366
2009-04-29 04:43:24 +00:00
Chris Lattner
e1eefefdc3
Disable the load-shrinking optimization from looking at
...
anything larger than 64-bits, avoiding a crash. This should
really be fixed to use APInts, though type legalization happens
to help us out and we get good code on the attached testcase at
least.
This fixes rdar://6836460
llvm-svn: 70360
2009-04-29 03:45:07 +00:00
Dan Gohman
4f8ccd5bc8
Update comments to reflect the current code.
...
llvm-svn: 70357
2009-04-29 01:54:20 +00:00