Anton Korobeynikov
2d1e7321f6
Fix code emission for conditional branches.
...
Patch by Collin Winter!
llvm-svn: 70898
2009-05-04 19:10:38 +00:00
Dan Gohman
3f02595048
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
630f4e1eb3
Trim unnecessary #includes.
...
llvm-svn: 70880
2009-05-04 17:11:06 +00:00
Duncan Sands
50c70336b0
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
fa552d728d
fix some problems spotted by Duncan and Nicolas Geoffray
...
llvm-svn: 70872
2009-05-04 16:29:24 +00:00
Argyrios Kyrtzidis
9ae29b2d8f
-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
3f77805642
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
d579cb1167
* 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
351134ba93
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
4b6072bcb8
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
79be34012f
Revert r70803 for now, it causes a regression.
...
llvm-svn: 70811
2009-05-03 23:27:19 +00:00
Argyrios Kyrtzidis
ce7196b903
-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
1de5cf548e
Typo.
...
llvm-svn: 70792
2009-05-03 19:10:11 +00:00
Evan Cheng
210fc62a91
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
4ff60e0cc2
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
2745bc92fa
Fix typo
...
llvm-svn: 70770
2009-05-03 13:19:57 +00:00
Anton Korobeynikov
1324f810d7
Update due to mainline API change
...
llvm-svn: 70769
2009-05-03 13:19:42 +00:00
Anton Korobeynikov
d089ef1003
Add TODO list :)
...
llvm-svn: 70768
2009-05-03 13:19:24 +00:00
Anton Korobeynikov
47fcd72e24
Make handling of conditional stuff much more straightforward
...
llvm-svn: 70767
2009-05-03 13:19:09 +00:00
Anton Korobeynikov
dedfa00ba1
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
eb2152f753
Expand divisions into libcalls
...
llvm-svn: 70765
2009-05-03 13:18:33 +00:00
Anton Korobeynikov
05b7a7c8f8
Properly handle sdiv / udiv / srem / urem libcalls
...
llvm-svn: 70764
2009-05-03 13:18:16 +00:00
Anton Korobeynikov
29747e9c26
Custom lower SIGN_EXTEND
...
llvm-svn: 70763
2009-05-03 13:17:49 +00:00
Anton Korobeynikov
3c48ea7dbe
Some eye-candy
...
llvm-svn: 70762
2009-05-03 13:17:31 +00:00
Anton Korobeynikov
48e21c57f1
Print function header / footer
...
llvm-svn: 70761
2009-05-03 13:17:11 +00:00
Anton Korobeynikov
8847e3e554
Fix printing: je => jeq
...
llvm-svn: 70760
2009-05-03 13:16:54 +00:00
Anton Korobeynikov
f3a6bc8562
Add 8bit shifts
...
llvm-svn: 70759
2009-05-03 13:16:37 +00:00
Anton Korobeynikov
61763b532a
Handle logical shift right (at least I hope so :) )
...
llvm-svn: 70758
2009-05-03 13:16:17 +00:00
Anton Korobeynikov
20a91130ce
Handle anyext
...
llvm-svn: 70757
2009-05-03 13:15:57 +00:00
Anton Korobeynikov
e31559576f
Expand all sorts of indirect branches
...
llvm-svn: 70755
2009-05-03 13:15:40 +00:00
Anton Korobeynikov
41917df643
Add InsertBranch() hook for tail mergeing
...
llvm-svn: 70754
2009-05-03 13:15:22 +00:00
Anton Korobeynikov
4b0a0f18fb
Implement bswap
...
llvm-svn: 70753
2009-05-03 13:15:03 +00:00
Anton Korobeynikov
ba0e81d4b2
Properly handle ExternalSymbol's
...
llvm-svn: 70752
2009-05-03 13:14:46 +00:00
Anton Korobeynikov
de60d1caef
Expand muls (all mulls!) to libcalls for now
...
llvm-svn: 70751
2009-05-03 13:14:25 +00:00
Anton Korobeynikov
399ad444fd
Proper name 16 bit libcalls
...
llvm-svn: 70750
2009-05-03 13:14:08 +00:00
Anton Korobeynikov
f3fc92d6fc
Add libcall expansion for 16 and 128 bit muls
...
llvm-svn: 70749
2009-05-03 13:13:51 +00:00
Anton Korobeynikov
0da755ee3e
Provide addc and subc
...
llvm-svn: 70748
2009-05-03 13:13:34 +00:00
Anton Korobeynikov
a3f7a83ad8
Add left shift
...
llvm-svn: 70747
2009-05-03 13:13:17 +00:00
Anton Korobeynikov
aa43d0b182
Add direct branch
...
llvm-svn: 70746
2009-05-03 13:12:58 +00:00
Anton Korobeynikov
24bfb51416
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
b6321e15f7
Lower select with custom inserted and make condjumps generic
...
llvm-svn: 70744
2009-05-03 13:12:23 +00:00
Anton Korobeynikov
962720129d
Add first draft for conditions, conditional branches, etc
...
llvm-svn: 70743
2009-05-03 13:12:06 +00:00
Anton Korobeynikov
aa51bff808
Hanle i8 returns
...
llvm-svn: 70742
2009-05-03 13:11:48 +00:00
Anton Korobeynikov
7212c15e70
Small tweaking
...
llvm-svn: 70741
2009-05-03 13:11:35 +00:00
Anton Korobeynikov
f2b50994ca
Add prologue/epilogue emission. Fix frame pointer handling.
...
llvm-svn: 70740
2009-05-03 13:11:20 +00:00
Anton Korobeynikov
1af0b61e7c
Add code for save/restore of callee-saved registers
...
llvm-svn: 70739
2009-05-03 13:11:04 +00:00
Anton Korobeynikov
b85f4ec819
Two more hooks for RA and FP registers
...
llvm-svn: 70738
2009-05-03 13:10:40 +00:00
Anton Korobeynikov
7784ae9a6f
Proper handle loading of effective address of stack slot stuff
...
llvm-svn: 70737
2009-05-03 13:10:26 +00:00
Anton Korobeynikov
0d1234fd69
Match frame indexes
...
llvm-svn: 70736
2009-05-03 13:10:11 +00:00
Anton Korobeynikov
f6af822c76
First draft of stack slot loads / stores lowering
...
llvm-svn: 70735
2009-05-03 13:09:57 +00:00
Anton Korobeynikov
ed65671768
Reverse order of memory arguments
...
llvm-svn: 70734
2009-05-03 13:09:40 +00:00
Anton Korobeynikov
04888305f6
Remove bogus pattern
...
llvm-svn: 70733
2009-05-03 13:09:24 +00:00
Anton Korobeynikov
6399a3d628
Correct asmprinting of memory operands
...
llvm-svn: 70732
2009-05-03 13:09:10 +00:00
Anton Korobeynikov
a3bce28ae0
Match wrapper node for address
...
llvm-svn: 70731
2009-05-03 13:08:51 +00:00
Anton Korobeynikov
cfc97056e7
Add lowering for global address nodes. Not pretty efficient though.
...
llvm-svn: 70730
2009-05-03 13:08:33 +00:00
Anton Korobeynikov
b5613928f5
Some early full call lowering draft for direct calls
...
llvm-svn: 70729
2009-05-03 13:08:13 +00:00
Anton Korobeynikov
ec3f0b3f9d
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
5613510c81
Add CALL lowering.
...
llvm-svn: 70727
2009-05-03 13:07:31 +00:00
Anton Korobeynikov
c995ddd017
Add bunch of mem-whatever patterns
...
llvm-svn: 70726
2009-05-03 13:07:10 +00:00
Anton Korobeynikov
f702a0085c
Add bunch of reg-mem inst patterns
...
llvm-svn: 70725
2009-05-03 13:06:46 +00:00
Anton Korobeynikov
ed1c3dfa0f
Add normal and trunc stores
...
llvm-svn: 70724
2009-05-03 13:06:26 +00:00
Anton Korobeynikov
31ecd23a9e
Basic support for mem=>reg moves
...
llvm-svn: 70723
2009-05-03 13:06:03 +00:00
Anton Korobeynikov
80a73e7d8b
Add 8-bit insts. zext behaviour is not modelled yet
...
llvm-svn: 70722
2009-05-03 13:05:42 +00:00
Anton Korobeynikov
b900245e13
Add 8-bit regclass and pattern for sext_inreg
...
llvm-svn: 70721
2009-05-03 13:05:22 +00:00
Anton Korobeynikov
b638fb10f5
Add pattern for OR
...
llvm-svn: 70720
2009-05-03 13:05:00 +00:00
Anton Korobeynikov
654cb0a761
Add reg-imm variants
...
llvm-svn: 70719
2009-05-03 13:04:41 +00:00
Anton Korobeynikov
37709c3584
Add hint to nop
...
llvm-svn: 70718
2009-05-03 13:04:23 +00:00
Anton Korobeynikov
6339db830e
Add more instructions
...
llvm-svn: 70717
2009-05-03 13:04:06 +00:00
Anton Korobeynikov
e32c817d2c
Cleanup
...
llvm-svn: 70716
2009-05-03 13:03:50 +00:00
Anton Korobeynikov
15a515b1af
Add dummy lowering for shifts
...
llvm-svn: 70715
2009-05-03 13:03:33 +00:00
Anton Korobeynikov
55a085b539
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
abb51755c8
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
8a17dff7d0
Add simple reg-reg add.
...
llvm-svn: 70712
2009-05-03 13:02:39 +00:00
Anton Korobeynikov
6ff6fc95a0
gas uses lower letter for register names
...
llvm-svn: 70711
2009-05-03 13:02:22 +00:00
Anton Korobeynikov
d7afd69e3b
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
c942782b3b
Add function body printing routine
...
llvm-svn: 70709
2009-05-03 13:01:41 +00:00
Anton Korobeynikov
ef811d8e05
Add 'msp430' target triple recognizer
...
llvm-svn: 70708
2009-05-03 13:01:23 +00:00
Anton Korobeynikov
a9b7df98e6
Make emit{Prologue,Epilogue}() noop for now
...
llvm-svn: 70707
2009-05-03 13:01:04 +00:00
Anton Korobeynikov
69f51f0b41
Add callee-saved regs & reg classes getter hooks
...
llvm-svn: 70706
2009-05-03 13:00:46 +00:00
Anton Korobeynikov
efcd5aa381
Add simple FP indicator for given function hook
...
llvm-svn: 70705
2009-05-03 13:00:28 +00:00
Anton Korobeynikov
c10f98ace3
Provide set of reserved registers
...
llvm-svn: 70704
2009-05-03 13:00:11 +00:00
Anton Korobeynikov
7bfc3ea2ee
Add proper ISD::RET lowering
...
llvm-svn: 70703
2009-05-03 12:59:50 +00:00
Anton Korobeynikov
3849be6ca1
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
77e5a11ec2
Fix register names, fix register allocation order, handle frame pointer.
...
llvm-svn: 70701
2009-05-03 12:59:16 +00:00
Anton Korobeynikov
64717bbc14
Clearify the usage and add some debug stuff
...
llvm-svn: 70700
2009-05-03 12:58:58 +00:00
Anton Korobeynikov
e10f69a8a7
Cleanup
...
llvm-svn: 70699
2009-05-03 12:58:40 +00:00
Anton Korobeynikov
128e8a188f
Add cmake script. No idea whether it works or not :)
...
llvm-svn: 70698
2009-05-03 12:58:22 +00:00
Anton Korobeynikov
4130a7c1e7
Add a note
...
llvm-svn: 70697
2009-05-03 12:58:05 +00:00
Anton Korobeynikov
7c4db99df3
Typo
...
llvm-svn: 70695
2009-05-03 12:57:47 +00:00
Anton Korobeynikov
101380015c
Dummy MSP430 backend
...
llvm-svn: 70694
2009-05-03 12:57:15 +00:00
Argyrios Kyrtzidis
97324cec99
-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
5036695c32
Revert r70645 for now; it's causing a variety of regressions.
...
llvm-svn: 70661
2009-05-03 05:46:20 +00:00
Nick Lewycky
431f97e4f0
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
e9a38d16fe
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
745ad4486e
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
b17dcbdadc
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
ff08995589
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
f150572af7
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
c27345f0b4
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
462cd34332
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
6409e7d4e9
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
e01821edbd
'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
410b4fdceb
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
62a3124fb8
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
d195a22e51
Actually insert inserted instructions into the InsertedValues map.
...
llvm-svn: 70557
2009-05-01 17:13:31 +00:00
Dan Gohman
65dbe7874f
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
7227bc88f0
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
150b4c3890
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
d3aa4215ef
Minor whitespace fix.
...
llvm-svn: 70551
2009-05-01 16:56:32 +00:00
Dan Gohman
90f73564d0
Fix an 80-column violation.
...
llvm-svn: 70550
2009-05-01 16:44:56 +00:00
Dan Gohman
194e42c612
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
6be8530158
Fix some code to work if TargetLowering is not available.
...
llvm-svn: 70546
2009-05-01 16:29:14 +00:00
Bill Wendling
80b9abf8f4
Simplify more code and add timer stuff.
...
llvm-svn: 70539
2009-05-01 08:40:06 +00:00
Bill Wendling
03968bd796
Simplify more code.
...
llvm-svn: 70537
2009-05-01 08:35:12 +00:00
Torok Edwin
83aec26ef8
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
87cbaf4bc9
Simplify some code.
...
llvm-svn: 70534
2009-05-01 08:32:14 +00:00
Bill Wendling
1c24c74495
Fix whitespace. It was confusing me.
...
llvm-svn: 70533
2009-05-01 08:25:13 +00:00
Evan Cheng
f8949a61bf
Code clean up. Bye bye PhysRegTracker.
...
llvm-svn: 70524
2009-05-01 01:03:49 +00:00
Argyrios Kyrtzidis
31af617924
Fix compilation for some targets other than x86.
...
llvm-svn: 70522
2009-04-30 23:50:26 +00:00
Argyrios Kyrtzidis
a5037484a4
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
30481e275c
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
050631c0a6
Join cross class copies using getCommonSubClass()
...
llvm-svn: 70513
2009-04-30 21:24:03 +00:00
Jakob Stoklund Olesen
e651f25a7b
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
fa066ef136
Add some comments, and tidy up some whitespace.
...
llvm-svn: 70510
2009-04-30 20:48:53 +00:00
Dan Gohman
2b8da35f9d
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
007cbe91c5
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
4bafc42185
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
fe0c648fee
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
db3a57ec5c
Set mayLoad on MOVZX32_NOREXrm8 too.
...
llvm-svn: 70466
2009-04-30 03:11:48 +00:00
Dan Gohman
7216b9da5f
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
99578674fd
Mark MOV8mr_NOREX and MOV8rm_NOREX as mayStore / mayLoad respectively.
...
llvm-svn: 70461
2009-04-30 00:58:57 +00:00
Chris Lattner
5ab42e93c4
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
352ee2cb05
Fix the JIT bindings for ocaml.
...
llvm-svn: 70454
2009-04-30 00:43:39 +00:00
Chris Lattner
1fba01bbcd
remove progname which is never set. PR4085
...
llvm-svn: 70453
2009-04-30 00:24:33 +00:00
Bill Wendling
026e5d7667
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
db59fda319
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
f4031bd01e
Print correct instruction in dump.
...
llvm-svn: 70427
2009-04-29 22:57:20 +00:00
Nate Begeman
7e6e352735
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
0098d01ef9
Implement getSCEVAtScope for SCEV cast expressions.
...
llvm-svn: 70422
2009-04-29 22:29:01 +00:00
Dan Gohman
494dac3f84
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
8ddd0b3599
Reword and tidy up some comments.
...
llvm-svn: 70416
2009-04-29 22:01:05 +00:00
Jakob Stoklund Olesen
1971dc7007
MachineInstr::isRegTiedTo{Use,Def}Operand can safely be made const.
...
llvm-svn: 70408
2009-04-29 20:57:16 +00:00
Dan Gohman
d9b11b2ef4
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
39b59db245
Update comment, replace theoretically impossible check with an assert.
...
llvm-svn: 70391
2009-04-29 18:13:31 +00:00
Dale Johannesen
b0bc5c2f81
Fix recent regression in gcc.dg/pr26719.c (6835035).
...
llvm-svn: 70386
2009-04-29 16:38:47 +00:00
Evan Cheng
9cce299cc8
spillPhysRegAroundRegDefsUses() may have invalidated iterators stored in fixed_ IntervalPtrs. Reset them.
...
llvm-svn: 70378
2009-04-29 07:16:34 +00:00
Nate Begeman
5f829d896d
Implement review feedback for vector shuffle work.
...
llvm-svn: 70372
2009-04-29 05:20:52 +00:00
Sanjiv Gupta
ccd30945f9
Add a public method called getAddressSpace() to the GlobalAddressSDNode.
...
llvm-svn: 70366
2009-04-29 04:43:24 +00:00
Chris Lattner
7d10386113
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
95c5b0e522
Update comments to reflect the current code.
...
llvm-svn: 70357
2009-04-29 01:54:20 +00:00