Chris Lattner
0561804097
use a typedef instead of spelling out an insane type. Yay for auto someday.
...
llvm-svn: 83707
2009-10-10 09:09:20 +00:00
Chris Lattner
75e5de9243
Change jump threading to use the new SSAUpdater class instead of
...
DemoteRegToStack. This makes it more efficient (because it isn't
creating a ton of load/stores that are eventually removed by a later
mem2reg), and more slightly more effective (because those load/stores
don't get in the way of threading).
llvm-svn: 83706
2009-10-10 09:05:58 +00:00
Chris Lattner
9c5aa00411
Implement an efficient and fully general SSA update mechanism that
...
works on unstructured CFGs. This implements PR217, our oldest open PR.
llvm-svn: 83705
2009-10-10 09:04:27 +00:00
Chris Lattner
317eb8ff20
random tidying
...
llvm-svn: 83701
2009-10-10 06:22:45 +00:00
Dan Gohman
605f85e0e6
Create a new InstrEmitter class for translating SelectionDAG nodes
...
into MachineInstrs. This is mostly just moving the code from
ScheduleDAGSDNodesEmit.cpp into a new class. This decouples MachineInstr
emitting from scheduling.
llvm-svn: 83699
2009-10-10 01:32:21 +00:00
Dan Gohman
3b025b778b
Make getMachineNode return a MachineSDNode* instead of a generic SDNode*
...
since it won't do any folding. This will help avoid some inconvenient
casting.
llvm-svn: 83698
2009-10-10 01:29:16 +00:00
Dan Gohman
84a61978de
Remove a no-longer-necessary #include.
...
llvm-svn: 83697
2009-10-10 00:36:09 +00:00
Dan Gohman
177b8de981
Replace X86's CanRematLoadWithDispOperand by calling the target-independent
...
MachineInstr::isInvariantLoad instead, which has the benefit of being
more complete.
llvm-svn: 83696
2009-10-10 00:34:18 +00:00
Dan Gohman
b98d95f4f9
Fix a missing initialization of PostRAScheduler's AA member.
...
llvm-svn: 83695
2009-10-10 00:15:38 +00:00
Dan Gohman
5141b26ffa
The ScheduleDAG framework now requires an AliasAnalysis argument, though
...
it isn't needed in the ScheduleDAGSDNodes schedulers.
llvm-svn: 83691
2009-10-09 23:33:48 +00:00
Dan Gohman
168ae2c7d5
Mark the LDR instruction with isReMaterializable, as it is rematerializable
...
when loading from an invariant memory location.
llvm-svn: 83688
2009-10-09 23:28:27 +00:00
Dan Gohman
5bfc2416fe
Factor out LiveIntervalAnalysis' code to determine whether an instruction
...
is trivially rematerializable and integrate it into
TargetInstrInfo::isTriviallyReMaterializable. This way, all places that
need to know whether an instruction is rematerializable will get the
same answer.
This enables the useful parts of the aggressive-remat option by
default -- using AliasAnalysis to determine whether a memory location
is invariant, and removes the questionable parts -- rematting operations
with virtual register inputs that may not be live everywhere.
llvm-svn: 83687
2009-10-09 23:27:56 +00:00
Devang Patel
c97c44b584
Extract scope information from the variable itself, instead of relying on alloca or llvm.dbg.declare location.
...
While recording beginning of a function, use scope info from the first location entry instead of just relying on first location entry itself.
llvm-svn: 83684
2009-10-09 22:42:28 +00:00
Jeffrey Yasskin
7edab17bef
ExecutionEngine::clearGlobalMappingsFromModule failed to remove reverse
...
mappings, which could cause errors and assert-failures. This patch fixes that,
adds a test, and refactors the global-mapping-removal code into a single place.
llvm-svn: 83678
2009-10-09 22:10:27 +00:00
Dan Gohman
14aaff93fc
Add a const qualifier.
...
llvm-svn: 83677
2009-10-09 22:09:05 +00:00
Dale Johannesen
7691b73da0
Use names instead of numbers for some of the magic
...
constants used in inlining heuristics (especially
those used in more than one file). No functional change.
llvm-svn: 83675
2009-10-09 21:42:02 +00:00
Kevin Enderby
430e05312d
Added another bit of the ARM target assembler to llvm-mc to parse register
...
lists. Changed ARMAsmParser::MatchRegisterName to return -1 instead of 0 on
errors so 0-15 values could be returned as register numbers. Also added the
rest of the arm register names to the currently hacked up version to allow more
testing. Some changes to ARMAsmParser::ParseOperand to give different errors
for things not yet supported and some additions to the hacked
ARMAsmParser::MatchInstruction to allow more testing for now.
llvm-svn: 83673
2009-10-09 21:12:28 +00:00
Dan Gohman
3005d6bf9f
isTriviallyReMaterializable checks the
...
TargetInstrDesc::isRematerializable flag, so it isn't necessary to do
this check in its callers.
llvm-svn: 83671
2009-10-09 21:02:10 +00:00
Dan Gohman
f2ae9c6220
Fix the x86 test-shrink optimization so that it doesn't shrink comparisons
...
when one of the bits being tested would end up being the sign bit in the
narrower type, and a signed comparison is being performed, since this would
change the result of the signed comparison. This fixes PR5132.
llvm-svn: 83670
2009-10-09 20:35:19 +00:00
Dan Gohman
4fe1a982ed
Add basic infrastructure and x86 support for preserving MachineMemOperand
...
information when unfolding memory references.
llvm-svn: 83656
2009-10-09 18:10:05 +00:00
Devang Patel
a772046766
Check invalid debug info for enums. This may happen when underlyng enum is optimized away. Eventually DwarfChecker will clean this up during llvm verification stage.
...
llvm-svn: 83655
2009-10-09 17:51:49 +00:00
Jim Grosbach
809d1bfdd3
when previous scratch register is killed, flag the value as no longer tracking
...
llvm-svn: 83653
2009-10-09 17:33:33 +00:00
Dan Gohman
731afb3b6e
Revert r83606 and add comments explaining why it isn't safe.
...
llvm-svn: 83649
2009-10-09 16:35:06 +00:00
Evan Cheng
ec853b9ba5
Give Dan and my recent changes, machine LICM is now code size neutral.
...
llvm-svn: 83624
2009-10-09 06:31:25 +00:00
Evan Cheng
439044f330
Fix a logic error that caused non-rematable loop invariants loads to be licm'ed out of loop.
...
llvm-svn: 83622
2009-10-09 06:21:52 +00:00
Evan Cheng
b1f6b5fccc
Reset kill markers after live interval is reconstructed.
...
llvm-svn: 83608
2009-10-09 01:17:11 +00:00
Dan Gohman
e81a040ce7
Preserve HasNSW and HasNUW when constructing SCEVs for Add and Mul
...
instructions.
llvm-svn: 83606
2009-10-09 00:41:22 +00:00
Dale Johannesen
10c870b46f
When considering whether to inline Callee into Caller,
...
and that will make Caller too big to inline, see if it
might be better to inline Caller into its callers instead.
This situation is described in PR 2973, although I haven't
tried the specific case in SPASS.
llvm-svn: 83602
2009-10-09 00:11:32 +00:00
Dan Gohman
4cdd530887
Add the ability to track HasNSW and HasNUW on more kinds of SCEV expressions.
...
llvm-svn: 83601
2009-10-09 00:10:36 +00:00
Bob Wilson
8092fef09a
Add codegen support for NEON vst4lane intrinsics with 128-bit vectors.
...
llvm-svn: 83600
2009-10-09 00:01:36 +00:00
Bob Wilson
979cb24a81
Add codegen support for NEON vst3lane intrinsics with 128-bit vectors.
...
llvm-svn: 83598
2009-10-08 23:51:31 +00:00
Bob Wilson
233992bc56
Add codegen support for NEON vst2lane intrinsics with 128-bit vectors.
...
llvm-svn: 83596
2009-10-08 23:38:24 +00:00
Bob Wilson
5b96a53ffe
Add codegen support for NEON vld4lane intrinsics with 128-bit vectors.
...
Also fix some copy-and-paste errors in previous changes.
llvm-svn: 83590
2009-10-08 22:53:57 +00:00
Evan Cheng
8eb0ce14d9
Remove code that makes no sense.
...
llvm-svn: 83589
2009-10-08 22:42:35 +00:00
Bob Wilson
7209d78713
Add codegen support for NEON vld3lane intrinsics with 128-bit vectors.
...
llvm-svn: 83585
2009-10-08 22:27:33 +00:00
Douglas Gregor
57f2c22857
Update CMake build yet again after a source file was removed
...
llvm-svn: 83575
2009-10-08 21:24:34 +00:00
Bill Wendling
d47d348cdf
It's possible for a global variable to be optimized out of a metadata object. So
...
we should allow a "null" with this dyn_cast.
llvm-svn: 83573
2009-10-08 20:52:51 +00:00
Anton Korobeynikov
f9c811c948
Use lower16 / upper16 imm modifiers to asmprint 32-bit imms splitted via movt/movw pair.
...
llvm-svn: 83572
2009-10-08 20:43:22 +00:00
Devang Patel
dcfcba3a71
Clear variable debug info map at the end of the function.
...
llvm-svn: 83571
2009-10-08 20:41:17 +00:00
Bob Wilson
3a55fe2105
Add codegen support for NEON vld2lane intrinsics with 128-bit vectors.
...
llvm-svn: 83568
2009-10-08 18:56:10 +00:00
Bob Wilson
0159d0d864
Clean up some unnecessary initializations.
...
llvm-svn: 83566
2009-10-08 18:52:56 +00:00
Bob Wilson
c62c9946e2
Clean up a comment (indentation was wrong).
...
llvm-svn: 83565
2009-10-08 18:51:31 +00:00
Bob Wilson
72c8f63e50
Add a SelectionDAG getTargetInsertSubreg convenience function,
...
similar to getTargetExtractSubreg.
llvm-svn: 83564
2009-10-08 18:49:46 +00:00
Devang Patel
e16aac2206
Do not record line number to implicitly mark start of function if function has arguments. Extra line number entries trip gdb in some cases.
...
llvm-svn: 83563
2009-10-08 18:48:03 +00:00
Richard Osborne
5e56dfa489
Add missing names for the XCore specific LADD and LSUB nodes.
...
llvm-svn: 83556
2009-10-08 17:14:57 +00:00
Dan Gohman
68e044e81a
Add a form of addPreserved which takes a string argument, to allow passes
...
to declare that they preserve other passes without needing to pull in
additional header file or library dependencies. Convert MachineFunctionPass
and CodeGenLICM to make use of this.
llvm-svn: 83555
2009-10-08 17:00:02 +00:00
Richard Osborne
1719935e3f
Add some peepholes for signed comparisons using ashr X, X, 32.
...
llvm-svn: 83549
2009-10-08 15:38:17 +00:00
Chris Lattner
41b5fd5218
remove LoopVR pass. According to Nick:
...
"LoopVR's logic was copied into ScalarEvolution::getUnsignedRange and
::getSignedRange. Please delete LoopVR."
llvm-svn: 83531
2009-10-08 06:42:44 +00:00
Bob Wilson
276bdabb9a
Add codegen support for NEON vst4 intrinsics with <1 x i64> vectors.
...
llvm-svn: 83526
2009-10-08 05:18:18 +00:00
Jim Grosbach
9f57f9bee6
Cleanup up unused R3LiveIn tracking.
...
llvm-svn: 83522
2009-10-08 01:50:26 +00:00