Eli Friedman
bea7c851cf
Fix for bug reported by Evzen Muller on llvm-commits: make sure to correctly
...
check the range of the constant when optimizing a comparison between a
constant and a sign_extend_inreg node.
llvm-svn: 109854
2010-07-30 06:44:31 +00:00
Benjamin Kramer
d1340209a1
Plug the remaining MC leaks by giving MCObjectStreamer/MCAsmStreamer ownership of the TargetAsmBackend and the MCCodeEmitter.
...
llvm-svn: 109767
2010-07-29 17:48:06 +00:00
Dale Johannesen
71204e008b
Comment typo.
...
llvm-svn: 109765
2010-07-29 17:45:24 +00:00
Jakob Stoklund Olesen
7f337a8e64
Fix a bug in the -regalloc=fast handling of exotic two-address instruction with
...
multiple defs, like t2LDRSB_POST.
The first def could accidentally steal the physreg that the second, tied def was
required to be allocated to.
Now, the tied use-def is treated more like an early clobber, and the physreg is
reserved before allocating the other defs.
This would never be a problem when the tied def was the only def which is the
usual case.
This fixes MallocBench/gs for thumb2 -O0.
llvm-svn: 109715
2010-07-29 00:52:19 +00:00
Jakob Stoklund Olesen
7ac201b2e3
Print out the regclass of any virtual registers used by a machine instruction.
...
llvm-svn: 109608
2010-07-28 18:35:46 +00:00
Devang Patel
38a7221118
It is FE's responsibility to emit proper directory name.
...
llvm-svn: 109538
2010-07-27 20:51:15 +00:00
Jim Grosbach
2f4adcee5f
Grammar
...
llvm-svn: 109525
2010-07-27 18:36:27 +00:00
Nate Begeman
15fe179ecb
Fix a crash in the dag combiner caused by ConstantFoldBIT_CONVERTofBUILD_VECTOR calling itself
...
recursively and returning a SCALAR_TO_VECTOR node, but assuming the input was always a BUILD_VECTOR.
llvm-svn: 109519
2010-07-27 18:02:18 +00:00
Jim Grosbach
4d81e796cb
80 column
...
llvm-svn: 109513
2010-07-27 17:38:47 +00:00
Jim Grosbach
7e561eb81c
fix typo
...
llvm-svn: 109511
2010-07-27 17:14:29 +00:00
Bill Wendling
bb2398331b
It's better to have the arrays, which would trigger the creation of stack
...
protectors, to be near the stack protectors on the stack. Accomplish this by
tagging the stack object with a predicate that indicates that it would trigger
this. In the prolog-epilog inserter, assign these objects to the stack after the
stack protector but before the other objects.
llvm-svn: 109481
2010-07-27 01:55:19 +00:00
Jakob Stoklund Olesen
2b379c4339
Add SplitEditor to SplitKit. This class will be used to edit live intervals and
...
rewrite instructions for live range splitting.
Still work in progress.
llvm-svn: 109469
2010-07-26 23:44:11 +00:00
Dan Gohman
64157c1919
Fix a use-after-free.
...
llvm-svn: 109468
2010-07-26 23:40:24 +00:00
Bill Wendling
efed27734e
Using llvm.eh.catch.all.value instead of .llvm.eh.catch.all.value.
...
llvm-svn: 109462
2010-07-26 22:36:52 +00:00
Evan Cheng
e5f7eaf10c
The "excess register pressure" returned by HighRegPressure() is not accurate enough to factor into scheduling priority. Eliminate it and add early exits to speed up scheduling.
...
llvm-svn: 109449
2010-07-26 21:49:07 +00:00
Dan Gohman
52e662a7f7
Handle Values with no value in getCopyFromRegs.
...
llvm-svn: 109415
2010-07-26 18:15:41 +00:00
Dan Gohman
8f7e88352a
A block dominates itself, by definition.
...
llvm-svn: 109402
2010-07-26 17:38:15 +00:00
Duncan Sands
0f0329ea35
Pacify gcc-4.5 which wrongly thinks that RExcess (passed as the Excess parameter)
...
may be used uninitialized in the callers of HighRegPressure.
llvm-svn: 109393
2010-07-26 07:54:17 +00:00
Lang Hames
998b522009
Factored out a bit of common code to mark VNInfos for deletion.
...
llvm-svn: 109388
2010-07-26 01:49:41 +00:00
Evan Cheng
94e820829a
Add comments.
...
llvm-svn: 109383
2010-07-25 18:59:43 +00:00
Bob Wilson
4f9b0d9fad
Fix crashes when scheduling a CopyToReg node -- getMachineOpcode asserts on
...
those. Radar 8231572.
llvm-svn: 109367
2010-07-25 05:34:27 +00:00
Anton Korobeynikov
2a0715eb1b
Add hook to insert late LLVM=>LLVM passes just before isel
...
llvm-svn: 109354
2010-07-24 20:48:54 +00:00
Bob Wilson
59114a12b8
Change ScheduleDAGInstrs::Defs and ::Uses to be variable-size vectors
...
instead of fixed size arrays, so that increasing FirstVirtualRegister to 16K
won't cause a compile time performance regression.
llvm-svn: 109330
2010-07-24 06:01:53 +00:00
Devang Patel
df9f5bf991
Use current working directory when Dirname is empty. This only happens when absolute source file path is used on compiler command line.
...
llvm-svn: 109302
2010-07-24 00:53:22 +00:00
Evan Cheng
a0b74d8804
Add an ILP scheduler. This is a register pressure aware scheduler that's
...
appropriate for targets without detailed instruction iterineries.
The scheduler schedules for increased instruction level parallelism in
low register pressure situation; it schedules to reduce register pressure
when the register pressure becomes high.
On x86_64, this is a win for all tests in CFP2000. It also sped up 256.bzip2
by 16%.
llvm-svn: 109300
2010-07-24 00:39:05 +00:00
Jim Grosbach
30d0fca117
Remove too-strict assertion. We may want the vreg copy of the physical register
...
to be of a different register class. For example, in Thumb1 if the live-in is
a high register, we want the vreg to be a low register. rdar://8224931
llvm-svn: 109291
2010-07-23 23:48:02 +00:00
Devang Patel
7049c83125
Revert r109262.
...
llvm-svn: 109285
2010-07-23 23:04:41 +00:00
Evan Cheng
f215e55d5f
- Allow target to specify when is register pressure "too high". In most cases,
...
it's too late to start backing off aggressive latency scheduling when most
of the registers are in use so the threshold should be a bit tighter.
- Correctly handle live out's and extract_subreg etc.
- Enable register pressure aware scheduling by default for hybrid scheduler.
For ARM, this is almost always a win on # of instructions. It's runtime
neutral for most of the tests. But for some kernels with high register
pressure it can be a huge win. e.g. 464.h264ref reduced number of spills by
54 and sped up by 20%.
llvm-svn: 109279
2010-07-23 22:39:59 +00:00
Dan Gohman
1694c4352a
Use the proper type for shift counts. This fixes a bootstrap error.
...
llvm-svn: 109265
2010-07-23 21:08:12 +00:00
Devang Patel
01d5937192
IF directory name is empty then try to extract one using absolute file name.
...
llvm-svn: 109262
2010-07-23 20:36:13 +00:00
Dan Gohman
8859ab786b
DAGCombine (shl (anyext x, c)) to (anyext (shl x, c)) if the high bits
...
are not demanded. This often allows the anyext to be folded away.
llvm-svn: 109242
2010-07-23 18:03:30 +00:00
Dan Gohman
b5a26419b8
Make SDNode::dump() print a newline at the end.
...
llvm-svn: 109234
2010-07-23 16:37:47 +00:00
Eric Christopher
308237108d
80-col.
...
llvm-svn: 109205
2010-07-23 01:05:59 +00:00
Chris Lattner
65ad913bec
remove the JIT "NeedsExactSize" feature and supporting logic.
...
llvm-svn: 109167
2010-07-22 21:17:55 +00:00
Gabor Greif
feb96f2df2
keep in 80 cols
...
llvm-svn: 109122
2010-07-22 17:18:03 +00:00
Gabor Greif
96a9f8c7c6
mass elimination of reliance on automatic iterator dereferencing
...
llvm-svn: 109103
2010-07-22 13:36:47 +00:00
Gabor Greif
a7509fca78
undo 80 column trespassing I caused
...
llvm-svn: 109092
2010-07-22 10:37:47 +00:00
Evan Cheng
c47b23ef06
Re-apply r109079 with fix.
...
llvm-svn: 109083
2010-07-22 06:24:48 +00:00
Owen Anderson
2553a4be1a
Revert r109079, which broke a lot of CodeGen tests.
...
llvm-svn: 109082
2010-07-22 06:01:28 +00:00
Reid Kleckner
3a876ca187
Initial modifications to MCAssembler and TargetMachine for the MCJIT.
...
Patch by Olivier Meurant!
llvm-svn: 109080
2010-07-22 05:58:53 +00:00
Evan Cheng
f1ca10c69f
Initialize RegLimit only when register pressure is being tracked.
...
llvm-svn: 109079
2010-07-22 05:18:41 +00:00
Evan Cheng
5aa6a25102
More register pressure aware scheduling work.
...
llvm-svn: 109064
2010-07-21 23:53:58 +00:00
Jim Grosbach
489d758ea8
For ARM/Darwin, add a dwarf entry indicating whether a function is arm or thumb
...
rdar://8202967
llvm-svn: 109057
2010-07-21 23:03:52 +00:00
Owen Anderson
f8addbb0a1
Fix batch of converting RegisterPass<> to INTIALIZE_PASS().
...
llvm-svn: 109045
2010-07-21 22:09:45 +00:00
Jim Grosbach
6b4f9f4c14
80 column and trailing whitespace cleanup
...
llvm-svn: 109037
2010-07-21 21:21:52 +00:00
Dan Gohman
fc3ee085a0
Disallow null as a named metadata operand.
...
Make MDNode::destroy private.
Fix the one thing that used MDNode::destroy, outside of MDNode itself.
One should never delete or destroy an MDNode explicitly. MDNodes
implicitly go away when there are no references to them (implementation
details aside).
llvm-svn: 109028
2010-07-21 18:54:18 +00:00
Lang Hames
26319a802c
Changed OStream templates to functions on raw_ostream, removed the unused "renderWarnings" function.
...
llvm-svn: 109003
2010-07-21 09:02:06 +00:00
Evan Cheng
df725c25dd
Teach bottom up pre-ra scheduler to track register pressure. Work in progress.
...
llvm-svn: 108991
2010-07-21 06:09:07 +00:00
Jakob Stoklund Olesen
2e78d6ed2e
Change the createSpiller interface to take a MachineFunctionPass argument.
...
The spillers can pluck the analyses they need from the pass reference.
Switch some never-null pointers to references.
llvm-svn: 108969
2010-07-20 23:50:15 +00:00
Jakob Stoklund Olesen
dcf78c06f8
Implement loop splitting analysis.
...
Determine which loop exit blocks need a 'pre-exit' block inserted.
Recognize when this would be impossible.
llvm-svn: 108941
2010-07-20 21:46:58 +00:00