Dan Gohman
de5dea869f
Remove ISD::DEBUG_LOC and ISD::DBG_LABEL, which are no longer used.
...
Note that "hasDotLocAndDotFile"-style debug info was already broken;
people wanting this functionality should implement it in the
AsmPrinter/DwarfWriter code.
llvm-svn: 89711
2009-11-23 23:20:51 +00:00
Dan Gohman
9d72cbf2d5
Move CopyCatchInfo into FunctionLoweringInfo.cpp too, for consistency.
...
llvm-svn: 89683
2009-11-23 18:12:11 +00:00
Dan Gohman
1a6c47f1cb
Rename SelectionDAGLowering to SelectionDAGBuilder, and rename
...
SelectionDAGBuild.cpp to SelectionDAGBuilder.cpp.
llvm-svn: 89681
2009-11-23 18:04:58 +00:00
Dan Gohman
91aad4b834
Move RegsForValue to an anonymous namespace, since it is only used
...
in this file.
llvm-svn: 89675
2009-11-23 17:46:23 +00:00
Dan Gohman
ad97b3dbd0
Move some more code out of SelectionDAGBuild.cpp and into
...
FunctionLoweringInfo.cpp.
llvm-svn: 89674
2009-11-23 17:42:46 +00:00
Ted Kremenek
9b6515794f
Update CMake file.
...
llvm-svn: 89671
2009-11-23 17:26:04 +00:00
Dan Gohman
a3624b6099
Move the FunctionLoweringInfo class and some related utility functions out
...
of SelectionDAGBuild.h/cpp into its own files, to help separate
general lowering logic from SelectionDAG-specific lowering logic.
llvm-svn: 89667
2009-11-23 17:16:22 +00:00
Devang Patel
ed85e12da6
We are not using DBG_STOPPOINT anymore.
...
llvm-svn: 89536
2009-11-21 02:46:55 +00:00
Dale Johannesen
b91eba382d
When generating a vector the really slow way, via loads
...
and stores, handle the case where the element size is not
a valid target type correctly (PPC).
llvm-svn: 89521
2009-11-21 00:53:23 +00:00
Dan Gohman
7a6611793f
Target-independent support for TargetFlags on BlockAddress operands,
...
and support for blockaddresses in x86-32 PIC mode.
llvm-svn: 89506
2009-11-20 23:18:13 +00:00
Duncan Sands
cc0a0cb4b7
Fix PR5558, which was caused by a wrong fix for PR3393 (see commit 63048),
...
which was an expensive checks failure due to a bug in the checking. This
patch in essence reverts the original fix for PR3393, and refixes it by a
tweak to the way expensive checking is done.
llvm-svn: 89454
2009-11-20 10:45:10 +00:00
Dan Gohman
20c8ab655e
Fix fast-isel to avoid selecting the return instruction if a
...
tail call has been encountered.
llvm-svn: 89444
2009-11-20 02:51:26 +00:00
Dan Gohman
82e80019a5
Remove the optimizations that convert BRCOND and BR_CC into
...
unconditional branches or fallthroghes. Instcombine/SimplifyCFG
should be simplifying branches with known conditions.
This fixes some problems caused by these transformations not
updating the MachineBasicBlock CFG.
llvm-svn: 89017
2009-11-17 00:47:23 +00:00
Dan Gohman
6b3f32e6d7
Fix a typo in a comment.
...
llvm-svn: 88953
2009-11-16 20:35:59 +00:00
Dan Gohman
a627e26d39
Enable the tail call optimization when the caller returns undef.
...
llvm-svn: 88737
2009-11-14 02:06:30 +00:00
Dan Gohman
f80dc08059
Don't let a noalias difference disrupt the tailcall optimization.
...
llvm-svn: 88672
2009-11-13 18:49:38 +00:00
Dale Johannesen
5f4eecf961
Adjust isConstantSplat to allow for big-endian targets.
...
PPC is such a target; make it work.
llvm-svn: 87060
2009-11-13 01:45:18 +00:00
David Greene
1fbe054450
Add a bool flag to StackObjects telling whether they reference spill
...
slots. The AsmPrinter will use this information to determine whether to
print a spill/reload comment.
Remove default argument values. It's too easy to pass a wrong argument
value when multiple arguments have default values. Make everything
explicit to trap bugs early.
Update all targets to adhere to the new interfaces..
llvm-svn: 87022
2009-11-12 20:49:22 +00:00
Benjamin Kramer
68e4945c03
Add compare_lower and equals_lower methods to StringRef. Switch all users of
...
StringsEqualNoCase (from StringExtras.h) to it.
llvm-svn: 87020
2009-11-12 20:36:59 +00:00
Devang Patel
2904aa9f6e
"Attach debug info with llvm instructions" mode was enabled a month ago. Now make it permanent and remove old way of inserting intrinsics to encode debug info for line number and scopes.
...
llvm-svn: 87014
2009-11-12 19:02:56 +00:00
Kenneth Uildriks
9f34406a90
x86 users can now return arbitrary sized structs. Structs too large to fit in return registers will be returned through a hidden sret parameter introduced during SelectionDAG construction.
...
llvm-svn: 86876
2009-11-11 19:59:24 +00:00
Dale Johannesen
6f7d5b22bb
Emit correct code when making a ConstantPool entry for a vector
...
constant whose component type is not a legal type for the target.
(If the target ConstantPool cannot handle this type either, it has
an opportunity to merge elements. In practice any target with
8-bit bytes must support i8 *as data*). 7320806 (partial).
llvm-svn: 86751
2009-11-10 23:16:41 +00:00
Devang Patel
f6eeaebd76
Implement support to debug inlined functions.
...
llvm-svn: 86748
2009-11-10 23:06:00 +00:00
Duncan Sands
dca0c28452
Codegen support for the llvm.invariant/lifetime.start/end intrinsics:
...
just throw them away.
llvm-svn: 86678
2009-11-10 09:08:09 +00:00
Dan Gohman
a951526510
Remove an unneeded #include.
...
llvm-svn: 86601
2009-11-09 22:28:30 +00:00
Mike Stump
f04c4cdb27
Fix for 64-bit builds.
...
llvm-svn: 86600
2009-11-09 22:28:21 +00:00
Evan Cheng
ad7c6124e7
Hide a couple of options.
...
llvm-svn: 86522
2009-11-09 06:49:37 +00:00
Anton Korobeynikov
f93bb39b03
Add 8 bit libcalls and make use of them for msp430
...
llvm-svn: 86384
2009-11-07 17:14:39 +00:00
Chris Lattner
8e1d7222a7
Fix PR5421 by APInt'izing switch lowering.
...
llvm-svn: 86354
2009-11-07 07:50:34 +00:00
Mon P Wang
fc032ced22
Fix memoizing of CvtRndSatSDNode
...
llvm-svn: 86340
2009-11-07 04:46:25 +00:00
Kenneth Uildriks
07119737aa
Add code to check at SelectionDAGISel::LowerArguments time to see if return values can be lowered to registers. Coming soon, code to perform sret-demotion if return values cannot be lowered to registers
...
llvm-svn: 86324
2009-11-07 02:11:54 +00:00
Dan Gohman
43bdc260d6
Avoid printing a redundant space in SDNode->dump().
...
llvm-svn: 86151
2009-11-05 18:49:11 +00:00
Dan Gohman
34341e69c4
Make -print-machineinstrs more readable.
...
- Be consistent when referring to MachineBasicBlocks: BB#0.
- Be consistent when referring to virtual registers: %reg1024.
- Be consistent when referring to unknown physical registers: %physreg10.
- Be consistent when referring to known physical registers: %RAX
- Be consistent when referring to register 0: %reg0
- Be consistent when printing alignments: align=16
- Print jump table contents.
- Don't print host addresses, in general.
- and various other cleanups.
llvm-svn: 85682
2009-10-31 20:19:03 +00:00
Dan Gohman
ba8735d25a
When discarding SrcValue information, discard all of it so that code
...
that uses this information knows to behave conservatively.
llvm-svn: 85654
2009-10-31 14:14:04 +00:00
Eric Christopher
a0ca9e944f
Fix warning with gcc-4.0 and signed/unsigned.
...
llvm-svn: 85648
2009-10-31 09:24:35 +00:00
Dan Gohman
d814e32e57
Don't mark registers dead here when processing nodes with MVT::Flag
...
results. This works around a problem affecting targets which rely on
MVT::Flag to handle physical register defs.
llvm-svn: 85638
2009-10-30 23:57:47 +00:00
Dan Gohman
6c9388011b
Initial target-independent CodeGen support for BlockAddresses.
...
llvm-svn: 85556
2009-10-30 01:27:03 +00:00
Dan Gohman
05efd893db
Remove some unnecessary spaces in debug output.
...
llvm-svn: 85536
2009-10-29 23:30:06 +00:00
Dan Gohman
554a75a973
Move some code from being emitted as boilerplate duplicated in every
...
*ISelDAGToDAG.cpp to being regular code in SelectionDAGISel.cpp.
llvm-svn: 85530
2009-10-29 22:30:23 +00:00
Dan Gohman
453d64c9f5
Rename usesCustomDAGSchedInserter to usesCustomInserter, and update a
...
bunch of associated comments, because it doesn't have anything to do
with DAGs or scheduling. This is another step in decoupling MachineInstr
emitting from scheduling.
llvm-svn: 85517
2009-10-29 18:10:34 +00:00
Eric Christopher
1fd4c577d2
Make sure we return the right sized type here.
...
llvm-svn: 85436
2009-10-28 21:32:16 +00:00
Dan Gohman
14ca753e28
Don't call SDNode::isPredecessorOf when it isn't necessary. If the load's
...
chains have no users, they can't be predecessors of the condition.
llvm-svn: 85394
2009-10-28 15:28:02 +00:00
Dan Gohman
cd139c0373
Rewrite SelectionDAG::isPredecessorOf to be iterative instead of
...
recursive to avoid consuming extraordinary amounts of stack space
when processing tall graphs.
llvm-svn: 85369
2009-10-28 03:44:30 +00:00
Evan Cheng
83896a59e1
Add a second ValueType argument to isFPImmLegal.
...
llvm-svn: 85361
2009-10-28 01:43:28 +00:00
Dan Gohman
4b46cbfc23
Mark dead physregdefs dead immediately. This helps MachineSink and
...
MachineLICM and other things which run before LiveVariables is run.
llvm-svn: 85360
2009-10-28 01:13:53 +00:00
Chris Lattner
d04cb6d0fa
rename indbr -> indirectbr to appease the residents of #llvm.
...
llvm-svn: 85351
2009-10-28 00:19:10 +00:00
Dan Gohman
a5e078b677
Update the MachineBasicBlock CFG for an indirect branch.
...
llvm-svn: 85325
2009-10-27 22:10:34 +00:00
Dan Gohman
a4374e66f0
Add CodeGen support for indirect branches.
...
llvm-svn: 85323
2009-10-27 21:56:26 +00:00
Chris Lattner
26076a8f10
don't use stdio
...
llvm-svn: 85296
2009-10-27 20:42:54 +00:00
Evan Cheng
16993aa30b
Do away with addLegalFPImmediate. Add a target hook isFPImmLegal which returns true if the fp immediate can be natively codegened by target.
...
llvm-svn: 85281
2009-10-27 19:56:55 +00:00
Chris Lattner
3ed871fe62
add enough support for indirect branch for the feature test to pass
...
(assembler,asmprinter, bc reader+writer) and document it. Codegen
currently aborts on it.
llvm-svn: 85274
2009-10-27 19:13:16 +00:00
Chris Lattner
0997991252
pseudosourcevalue is also still using getGlobalContext(), so it isn't
...
thread safe either.
llvm-svn: 85253
2009-10-27 17:02:08 +00:00
Eric Christopher
7a50b280c1
Add objectsize intrinsic and hook it up through codegen. Doesn't
...
do anything than return "I don't know" at the moment.
llvm-svn: 85189
2009-10-27 00:52:25 +00:00
Victor Hernandez
de5ad42aa1
Remove FreeInst.
...
Remove LowerAllocations pass.
Update some more passes to treate free calls just like they were treating FreeInst.
llvm-svn: 85176
2009-10-26 23:43:48 +00:00
Nick Lewycky
974e12b2d3
Remove includes of Support/Compiler.h that are no longer needed after the
...
VISIBILITY_HIDDEN removal.
llvm-svn: 85043
2009-10-25 06:57:41 +00:00
Nick Lewycky
02d5f77d26
Remove VISIBILITY_HIDDEN from class/struct found inside anonymous namespaces.
...
Chris claims we should never have visibility_hidden inside any .cpp file but
that's still not true even after this commit.
llvm-svn: 85042
2009-10-25 06:33:48 +00:00
Dan Gohman
4ef112be62
APInt-ify the gep scaling code, so that it correctly handles the case where
...
the scale overflows pointer-sized arithmetic. This fixes PR5281.
llvm-svn: 84954
2009-10-23 17:57:43 +00:00
Anton Korobeynikov
8626367e38
Fix null pointer dereference.
...
llvm-svn: 84806
2009-10-22 00:15:17 +00:00
Anton Korobeynikov
a6faf60831
Fix invalid for vector types fneg(bitconvert(x)) => bitconvert(x ^ sign)
...
transform.
llvm-svn: 84683
2009-10-20 21:37:45 +00:00
Evan Cheng
0e9d9ca855
-Revert parts of 84326 and 84411. Distinquishing between fixed and non-fixed
...
stack slots and giving them different PseudoSourceValue's did not fix the
problem of post-alloc scheduling miscompiling llvm itself.
- Apply Dan's conservative workaround by assuming any non fixed stack slots can
alias other memory locations. This means a load from spill slot #1 cannot
move above a store of spill slot #2 .
- Enable post-alloc scheduling for x86 at optimization leverl Default and above.
llvm-svn: 84424
2009-10-18 18:16:27 +00:00
Evan Cheng
0b8db2dab7
Only fixed stack objects and spill slots should be get FixedStack PseudoSourceValue.
...
llvm-svn: 84411
2009-10-18 06:27:36 +00:00
Evan Cheng
8759585aba
Revert 84315 for now. Re-thinking the patch.
...
llvm-svn: 84321
2009-10-17 07:53:04 +00:00
Evan Cheng
0818d87ed1
Rename getFixedStack to getStackObject. The stack objects represented are not
...
necessarily fixed. Only those will negative frame indices are "fixed."
llvm-svn: 84315
2009-10-17 06:22:26 +00:00
Evan Cheng
a6e4db8ff7
80 col violation.
...
llvm-svn: 84311
2009-10-17 06:05:11 +00:00
Dan Gohman
650997fb0b
Delete an obsolete comment.
...
llvm-svn: 84300
2009-10-17 01:37:38 +00:00
Victor Hernandez
a3aaf85e23
Remove MallocInst from LLVM Instructions.
...
llvm-svn: 84299
2009-10-17 01:18:07 +00:00
Mon P Wang
b1baaf5ab9
Allow widening of extract subvector
...
llvm-svn: 84279
2009-10-16 22:05:48 +00:00
Zhongxing Xu
47062ce503
Indent code.
...
llvm-svn: 84247
2009-10-16 05:42:28 +00:00
Jakob Stoklund Olesen
e4197250cc
Report errors correctly for unselected target intrinsics.
...
llvm-svn: 84193
2009-10-15 18:50:03 +00:00
Duncan Sands
8e6ccb65df
I don't see any point in having both eh.selector.i32 and eh.selector.i64,
...
so get rid of eh.selector.i64 and rename eh.selector.i32 to eh.selector.
Likewise for eh.typeid.for. This aligns us with gcc, which always uses a
32 bit value for the selector on all platforms. My understanding is that
the register allocator used to assert if the selector intrinsic size didn't
match the pointer size, and this was the reason for introducing the two
variants. However my testing shows that this is no longer the case (I
fixed some bugs in selector lowering yesterday, and some more today in the
fastisel path; these might have caused the original problems).
llvm-svn: 84106
2009-10-14 16:11:37 +00:00
Devang Patel
d7ebfe3963
s/DebugLoc.CompileUnit/DebugLoc.Scope/g
...
s/DebugLoc.InlinedLoc/DebugLoc.InlinedAtLoc/g
llvm-svn: 84054
2009-10-13 23:28:53 +00:00
Duncan Sands
18a956cb4a
Introduce new convenience methods for sign extending or
...
truncating an SDValue (depending on whether the target
type is bigger or smaller than the value's type); or zero
extending or truncating it. Use it in a few places (this
seems to be a popular operation, but I only modified cases
of it in SelectionDAGBuild). In particular, the eh_selector
lowering was doing this wrong due to a repeated rather than
inverted test, fixed with this change.
llvm-svn: 84027
2009-10-13 21:04:12 +00:00
Devang Patel
0af2a420cd
Set default location for a function if it is not set.
...
llvm-svn: 83921
2009-10-12 23:10:55 +00:00
Nate Begeman
a3ed9edd40
More heuristics for Combiner-AA. Still catches all important cases, but
...
compile time penalty on gnugo, the worst case in MultiSource, is down to
about 2.5% from 30%
llvm-svn: 83824
2009-10-12 05:53:58 +00:00
Dan Gohman
b8120770b4
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
a22f2d8614
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
918ec53c64
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
Devang Patel
df45c7f642
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
Bob Wilson
2a45a65511
Add a SelectionDAG getTargetInsertSubreg convenience function,
...
similar to getTargetExtractSubreg.
llvm-svn: 83564
2009-10-08 18:49:46 +00:00
Devang Patel
4598eb6214
Add support to handle debug info attached to an instruction.
...
This is not yet enabled.
llvm-svn: 83400
2009-10-06 18:37:31 +00:00
Devang Patel
bb802206d2
Set default location for the function if it is not already set.
...
This code is not yet enabled.
llvm-svn: 83349
2009-10-06 00:09:08 +00:00
Devang Patel
4dbca6dfd4
If location info is attached with an instruction then keep track of alloca slots used by a variable. This info will be used by AsmPrinter to emit debug info for variables.
...
llvm-svn: 83189
2009-10-01 01:03:26 +00:00
Devang Patel
3256c751f5
Use MDNode * directly as an RecordSourceLine() argument.
...
llvm-svn: 83182
2009-09-30 22:51:28 +00:00
Reid Kleckner
cea8dab1d1
Silence comparison always false warning in -Asserts mode.
...
llvm-svn: 83164
2009-09-30 20:43:07 +00:00
Reid Kleckner
8ff5c19ebd
Fix integer overflow in instruction scheduling. This can happen if we have
...
basic blocks that are so long that their size overflows a short.
Also assert that overflow does not happen in the future, as requested by Evan.
This fixes PR4401.
llvm-svn: 83159
2009-09-30 20:15:38 +00:00
Devang Patel
5d58383ea9
Remove unnecessary cast.
...
llvm-svn: 83100
2009-09-29 19:56:13 +00:00
Devang Patel
2d85eef974
s/class Metadata/class MetadataContext/g
...
llvm-svn: 83019
2009-09-28 21:41:20 +00:00
Devang Patel
b1a4477f1f
Do not use global typedef for MDKindID.
...
llvm-svn: 83016
2009-09-28 21:14:55 +00:00
Dan Gohman
6905f15256
Use VerifySchedule instead of doing the work manually.
...
llvm-svn: 82995
2009-09-28 16:09:41 +00:00
Dan Gohman
832800aa6f
Convert comparisons like (x == infinity) to (x >= infinity) on targets
...
where FCMP_OEQ is not legal and FCMP_OGE is, such as x86.
llvm-svn: 82861
2009-09-26 15:24:17 +00:00
Dan Gohman
48b185d6f7
Improve MachineMemOperand handling.
...
- Allocate MachineMemOperands and MachineMemOperand lists in MachineFunctions.
This eliminates MachineInstr's std::list member and allows the data to be
created by isel and live for the remainder of codegen, avoiding a lot of
copying and unnecessary translation. This also shrinks MemSDNode.
- Delete MemOperandSDNode. Introduce MachineSDNode which has dedicated
fields for MachineMemOperands.
- Change MemSDNode to have a MachineMemOperand member instead of its own
fields with the same information. This introduces some redundancy, but
it's more consistent with what MachineInstr will eventually want.
- Ignore alignment when searching for redundant loads for CSE, but remember
the greatest alignment.
Target-specific code which previously used MemOperandSDNodes with generic
SDNodes now use MemIntrinsicSDNodes, with opcodes in a designated range
so that the SelectionDAG framework knows that MachineMemOperand information
is available.
llvm-svn: 82794
2009-09-25 20:36:54 +00:00
Dan Gohman
32f71d714b
Rename getTargetNode to getMachineNode, for consistency with the
...
naming scheme used in SelectionDAG, where there are multiple kinds
of "target" nodes, but "machine" nodes are nodes which represent
a MachineInstr.
llvm-svn: 82790
2009-09-25 18:54:59 +00:00
Dale Johannesen
a318d91a1e
Make sure sin, cos, sqrt calls are marked readonly
...
before producing FSIN, FCOS, FSQRT. If they aren't
so marked we have to assume they might set errno.
llvm-svn: 82781
2009-09-25 18:00:35 +00:00
Dale Johannesen
c72134269f
Generate FSQRT from calls to the sqrt function, which
...
allows appropriate backends to generate a sqrt instruction.
On x86, this isn't done at -O0 because we go through
FastISel instead. This is a behavior change from before
this series of sqrt patches started. I think this is OK
considering that compile speed is most important at -O0, but
could be convinced otherwise.
llvm-svn: 82778
2009-09-25 17:23:22 +00:00
Nate Begeman
18150d5abc
Fix combiner-aa issue with bases which are different, but can alias.
...
Previously, it treated GV+28 GV+0 as different bases, and assumed they could
not alias.
llvm-svn: 82753
2009-09-25 06:05:26 +00:00
Dan Gohman
ebdfe4af62
Add a version of dumpr() that has a SelectionDAG* argument.
...
llvm-svn: 82742
2009-09-25 00:34:34 +00:00
Dan Gohman
203d53ed79
Use getStoreSize() instead of getStoreSizeInBits()/8.
...
llvm-svn: 82656
2009-09-23 21:07:02 +00:00
Dan Gohman
08c0a95ac6
Rename several variables from EVT to more descriptive names, now that EVT
...
is also the name of their type, as declarations like "EVT EVT" look
really odd.
llvm-svn: 82654
2009-09-23 21:02:20 +00:00
Dan Gohman
c0353bfff5
Give MachineMemOperand an operator<<, factoring out code from
...
two different places for printing MachineMemOperands.
Drop the virtual from Value::dump and instead give Value a
protected virtual hook that can be overridden by subclasses
to implement custom printing. This lets printing be more
consistent, and simplifies printing of PseudoSourceValue
values.
llvm-svn: 82599
2009-09-23 01:33:16 +00:00
Dan Gohman
e7c8242baa
Change MachineMemOperand's alignment value to be the alignment of
...
the base pointer, without the offset. This matches MemSDNode's
new alignment behavior, and holds more interesting information.
llvm-svn: 82473
2009-09-21 19:47:04 +00:00
Chris Lattner
bb1a1bd2bd
tidy up
...
llvm-svn: 82397
2009-09-20 17:32:21 +00:00
Daniel Dunbar
7d6781b0fe
Tabs -> spaces, and remove trailing whitespace.
...
llvm-svn: 82355
2009-09-20 02:20:51 +00:00
Evan Cheng
9827ad39a7
Fix PR4926. When target hook EmitInstrWithCustomInserter() insert new basic blocks and update CFG, it should also inform sdisel of the changes so the phi source operands will come from the right basic blocks.
...
llvm-svn: 82311
2009-09-19 09:51:03 +00:00
Evan Cheng
270d0f986f
Enhance EmitInstrWithCustomInserter() so target can specify CFG changes that sdisel will use to properly complete phi nodes.
...
Not functionality change yet.
llvm-svn: 82273
2009-09-18 21:02:19 +00:00
Chris Lattner
e133923abe
duncan points out the EH selector values are signed.
...
llvm-svn: 82245
2009-09-18 18:34:29 +00:00
Evan Cheng
f4db6396e0
Revert r82214. It broke 403.gcc on x86_64 / Darwin.
...
llvm-svn: 82215
2009-09-18 08:26:06 +00:00
Evan Cheng
6ba1931d60
Fix a bug in sdisel switch lowering code. When it updates the phi nodes in switch successor blocks, it can introduce multiple phi operands of the same value from different blocks (and may not be on the predecessor list).
...
This can be seen on CodeGen/Generic/2006-09-06-SwitchLowering.ll. But it's not known to cause any real regression (but I have added an assertion for it now).
llvm-svn: 82214
2009-09-18 08:16:04 +00:00
Chris Lattner
1bd81314e7
tolerate llvm.eh.selector.i64 on 32-bit systems and llvm.eh.selector.i32 on
...
64-bit systems.
llvm-svn: 82180
2009-09-17 23:54:54 +00:00
Devang Patel
44b3a87f78
Fix typo.
...
llvm-svn: 82080
2009-09-16 21:09:07 +00:00
Devang Patel
852c9b6627
At iSel time, update DebugLoc based on debug info attached with an instruction.
...
llvm-svn: 82077
2009-09-16 20:39:11 +00:00
Nate Begeman
fbb88b180c
Do not add the SVOffset to the Node CSE ID. The same pointer argument cannot have different
...
SVOffsets.
llvm-svn: 81937
2009-09-15 22:30:11 +00:00
Nate Begeman
178135c88b
Better solution for tracking both the original alignment of the access, and the current alignment based
...
on the source value offset. This avoids increasing the size of mem nodes.
llvm-svn: 81897
2009-09-15 19:05:41 +00:00
Nate Begeman
d41f8fd2b3
Remove incorrect CSE code from r81813.
...
llvm-svn: 81819
2009-09-15 00:38:09 +00:00
Nate Begeman
879d8f1c3e
Substantially speed up combiner-aa in the following ways:
...
1. Switch from an std::set to a SmallPtrSet for visited chain nodes.
2. Do not force the recursive flattening of token factor nodes, regardless of
use count.
3. Immediately process newly created TokenFactor nodes.
Also, improve combiner-aa by teaching it that loads to non-overlapping offsets
of relatively aligned objects cannot alias.
These changes result in a >5x speedup for combiner-aa on most testcases.
llvm-svn: 81816
2009-09-15 00:18:30 +00:00
Nate Begeman
01c1e1152d
Teach the legalizer to propagate the original alignment of loads and store when
...
it splits them.
llvm-svn: 81815
2009-09-15 00:14:28 +00:00
Nate Begeman
02a685a914
Add an "original alignment" field to load and store nodes. This enables the
...
DAG Combiner to disambiguate chains for loads and stores of types which are
broken up by the Legalizer into smaller pieces.
llvm-svn: 81813
2009-09-15 00:13:12 +00:00
Chris Lattner
0bad631cde
kill off the last use of TRI::AsmName.
...
llvm-svn: 81727
2009-09-13 22:42:03 +00:00
Dan Gohman
9cbef32726
Make fast-isel try ISD::FNEG before resorting to bitcasts and xors.
...
llvm-svn: 81493
2009-09-11 00:36:43 +00:00
Dan Gohman
89b090e51e
Reapply r81171 with a fix: don't try to use i64 when it
...
isn't legal.
llvm-svn: 81492
2009-09-11 00:34:46 +00:00
Bob Wilson
39f51320ca
Don't swap the operands of a subtraction when trying to create a
...
post-decrement load/store.
llvm-svn: 81464
2009-09-10 22:09:31 +00:00
Bob Wilson
59e4c84c6f
Revert r81171 which was causing pr4927.
...
llvm-svn: 81415
2009-09-10 00:49:22 +00:00
Dan Gohman
16ad903fcf
When widening a vector load, use the correct chain. This fixes PR4891.
...
llvm-svn: 81343
2009-09-09 14:22:57 +00:00
Chris Lattner
e819cfbc71
change selectiondag to add the sign extended versions of immediate operands
...
to instructions instead of zero extended ones. This makes the asmprinter
print signed values more consistently. This apparently only really affects
the X86 backend.
llvm-svn: 81265
2009-09-08 23:05:44 +00:00
Dan Gohman
f4a0f0f033
Fix an abort on a store of an empty struct member. getValue returns
...
null in the case of an empty struct, so don't try to call getNumValues
on it.
llvm-svn: 81180
2009-09-08 01:44:02 +00:00
Dan Gohman
2512a42548
Fix a thinko: When lowering fneg with xor, bitcast the operands
...
from floating-point to integer first, and bitcast the result
back to floating-point. Previously, this test was passing by
falling back to SelectionDAG lowering. The resulting code isn't
as nice, but it's correct and CodeGen now stays on the fast path.
llvm-svn: 81171
2009-09-07 23:47:14 +00:00
Duncan Sands
3ee3c174b1
Simplify. Testing shows that this is not equivalent to BBI = CR.CaseBB + 1.
...
llvm-svn: 81124
2009-09-06 18:03:32 +00:00
Duncan Sands
89720bbd11
Remove some not-really-used variables, as warned
...
about by icc (#593 , partial). Patch by Erick Tryzelaar.
llvm-svn: 81115
2009-09-06 12:41:19 +00:00
Duncan Sands
2fbeaf084f
Remove some unused variables and methods warned about by
...
icc (#177 , partial). Patch by Erick Tryzelaar.
llvm-svn: 81106
2009-09-06 08:33:48 +00:00
Devang Patel
f03667e20e
Detect VLAs.
...
Do not use DenseMap operator[] because it inserts new entry if lookup fails. Use find() to check an entry in a DenseMap first.
llvm-svn: 81058
2009-09-05 00:34:14 +00:00
Dan Gohman
aa92dc1e61
LLVM currently represents floating-point negation as -0.0 - x. Fix
...
FastISel to recognize this pattern and emit a floating-point
negation using xor.
llvm-svn: 80963
2009-09-03 22:53:57 +00:00
Dan Gohman
d0d5e685da
Recognize more opportunities to use SSE min and max instructions,
...
swapping the operands if necessary.
llvm-svn: 80940
2009-09-03 20:34:31 +00:00
Sandeep Patel
68c5f477fa
Retype from unsigned to CallingConv::ID accordingly. Approved by Bob Wilson.
...
llvm-svn: 80773
2009-09-02 08:44:58 +00:00
Daniel Dunbar
f7a14aa43d
Remove Offset from ExternalSybmol MachineOperands, this is unused (and at least partly unsupported, in X86 encoding at least).
...
llvm-svn: 80726
2009-09-01 22:06:46 +00:00
Devang Patel
80ae34974b
Reapply 79977.
...
Use MDNodes to encode debug info in llvm IR.
llvm-svn: 80406
2009-08-28 23:24:31 +00:00
Anton Korobeynikov
50509fc2cb
Add extload expansion for f128
...
llvm-svn: 80116
2009-08-26 17:39:40 +00:00
Devang Patel
f08e35d9dc
Revert 79977. It causes llvm-gcc bootstrap failures on some platforms.
...
llvm-svn: 80073
2009-08-26 05:01:18 +00:00
Owen Anderson
3b1665eca5
Get rid of this horrible "benign race" by exploiting ManagedStatic to initialize
...
the array on its first access.
llvm-svn: 80040
2009-08-25 22:27:22 +00:00
Devang Patel
02aac922b4
Update DebugInfo interface to use metadata, instead of special named llvm.dbg.... global variables, to encode debugging information in llvm IR. This is mostly a mechanical change that tests metadata support very well.
...
This change speeds up llvm-gcc by more then 6% at "-O0 -g" (measured by compiling InstructionCombining.cpp!)
llvm-svn: 79977
2009-08-25 05:24:07 +00:00
Daniel Dunbar
34ee203337
Fix some refactos for iostream changes (in -Asserts mode).
...
- The world needs better C++ refactoring tools, can I get an Amen!?
llvm-svn: 79843
2009-08-23 08:50:52 +00:00
Chris Lattner
317dbbcfb1
eliminate uses of cerr()
...
llvm-svn: 79834
2009-08-23 07:05:07 +00:00
Chris Lattner
4dc3edde9f
remove a few DOUTs here and there.
...
llvm-svn: 79832
2009-08-23 06:35:02 +00:00
Chris Lattner
1362602eb2
Change Pass::print to take a raw ostream instead of std::ostream,
...
update all code that this affects.
llvm-svn: 79830
2009-08-23 06:03:38 +00:00
Eli Friedman
79ba8f2edc
Add check for completeness. Note that this doesn't actually have any
...
effect with the way the current code is structured.
llvm-svn: 79792
2009-08-23 00:14:19 +00:00
Chris Lattner
7b26fce23e
Rename TargetAsmInfo (and its subclasses) to MCAsmInfo.
...
llvm-svn: 79763
2009-08-22 20:48:53 +00:00
Devang Patel
0939595711
Record variable debug info at ISel time directly.
...
llvm-svn: 79742
2009-08-22 17:12:53 +00:00
Owen Anderson
63010bb65a
Reapply r79708 with the appropriate fix for the case that still requires locking.
...
llvm-svn: 79731
2009-08-22 06:32:36 +00:00
Chris Lattner
56d60eaa61
revert r79708 + r79711
...
llvm-svn: 79720
2009-08-22 04:07:34 +00:00
Eric Christopher
677c2287da
Actually remove unused static. Previous commit removed trailing
...
whitespace.
llvm-svn: 79711
2009-08-22 00:41:47 +00:00
Eric Christopher
dfda92b76e
Remove unused static.
...
llvm-svn: 79710
2009-08-22 00:40:45 +00:00
Owen Anderson
8e2456c254
Ease contention on this lock by noticing that all writes to the VTs array will
...
be of (dynamically) constant values, so races on it are immaterial. We just need
to ensure that at least one write has completed before return the pointer into it.
With this change, parllc exhibits essentially no overhead on 403.gcc.
llvm-svn: 79708
2009-08-22 00:29:12 +00:00