Chris Lattner
dda5ca59e2
Switch GVN and memdep to use PHITransAddr, which correctly handles
...
phi translation of complex expressions like &A[i+1]. This has the
following benefits:
1. The phi translation logic is all contained in its own class with
a strong interface and verification that it is self consistent.
2. The logic is more correct than before. Previously, if intermediate
expressions got PHI translated, we'd miss the update and scan for
the wrong pointers in predecessor blocks. @phi_trans2 is a testcase
for this.
3. We have a lot less code in memdep.
We can handle phi translation across blocks of things like @phi_trans3,
which is pretty insane :).
This patch should fix the miscompiles of 255.vortex, and I tested it
with a bootstrap of llvm-gcc, llvm-test and dejagnu of course.
llvm-svn: 90926
2009-12-09 01:59:31 +00:00
Evan Cheng
7941695285
Move isConsecutiveLoad to SelectionDAG. It's not target dependent and it's primary used by selectdag passes.
...
llvm-svn: 90922
2009-12-09 01:36:00 +00:00
Evan Cheng
293ec7b394
Add const qualifier.
...
llvm-svn: 90918
2009-12-09 01:10:37 +00:00
Evan Cheng
b925774a74
Refactor InferAlignment out of DAGCombine.
...
llvm-svn: 90917
2009-12-09 01:04:59 +00:00
Chris Lattner
3211af28ba
fix many input tracking bugs.
...
llvm-svn: 90915
2009-12-09 00:56:14 +00:00
Chris Lattner
b0d20540ad
instructions defined in CurBB may be intermediate nodes of the computation.
...
llvm-svn: 90908
2009-12-09 00:10:55 +00:00
Chris Lattner
83cb0b1450
add dumping and sanity checking support.
...
llvm-svn: 90906
2009-12-09 00:01:00 +00:00
Chris Lattner
604cebbfc1
make sure that PHITransAddr keeps its 'InstInputs' list up to
...
date when instsimplify kicks in.
llvm-svn: 90901
2009-12-08 23:42:51 +00:00
Devang Patel
11874672da
Revert 90858 90875 and 90805 for now.
...
llvm-svn: 90898
2009-12-08 23:21:45 +00:00
Evan Cheng
522b98d737
Revert 90789 for now. It caused massive compile time regression. Post-ra scheduler slowed down dramatically with this.
...
llvm-svn: 90868
2009-12-08 19:34:53 +00:00
Chris Lattner
8cc673c6a0
fix a typo (and -> add) and fix GetAvailablePHITranslatedSubExpr to not
...
side-effect the current object.
llvm-svn: 90837
2009-12-08 06:06:26 +00:00
Oscar Fuentes
bb3243a706
Removed VC++ compatibility code from DataTypes.h.in.
...
This header file is not used on VC++ builds.
llvm-svn: 90829
2009-12-08 02:49:54 +00:00
Oscar Fuentes
7c94e1aa2a
For VC++, define the ?INT*_C macros only it they are not yet defined.
...
Some compatibility updates like the Boost TR1 compatibility headers
define them.
Patch contributed by OvermindDL1!
llvm-svn: 90828
2009-12-08 02:40:09 +00:00
Victor Hernandez
f5143485fa
Rename DIFactory::InsertValue() as DIFactory::InsertDbgValueIntrinsic()
...
llvm-svn: 90807
2009-12-07 21:54:43 +00:00
Devang Patel
e59f4f7204
Add support to emit debug info for c++ style namespaces.
...
llvm-svn: 90805
2009-12-07 21:41:32 +00:00
Chris Lattner
9ed7e3ffb9
add accessor, improve comment.
...
llvm-svn: 90792
2009-12-07 19:45:30 +00:00
Dan Gohman
b52be9ecc4
Apply Pekka Jääskeläinen's patch to raise the first virtual register
...
number in order to accomodate targets with more than 1024 registers.
llvm-svn: 90789
2009-12-07 19:38:26 +00:00
Victor Hernandez
2a16652946
Introduce the "@llvm.dbg.value" debug intrinsic.
...
The semantics of llvm.dbg.value are that starting from where it is executed, an offset into the specified user source variable is specified to get a new value.
An example:
call void @llvm.dbg.value(metadata !{ i32 7 }, i64 0, metadata !2 )
Here the user source variable associated with metadata #2 gets the value "i32 7" at offset 0.
llvm-svn: 90788
2009-12-07 19:36:34 +00:00
Chris Lattner
0a810a827f
checkpoint of the new PHITransAddr code, still not done and not used by
...
anything.
llvm-svn: 90779
2009-12-07 18:36:53 +00:00
Mikhail Glushenkov
c05e105f51
Deprecate 'unpack_values'.
...
Use 'forward_values' + 'comma_separated' instead.
llvm-svn: 90774
2009-12-07 18:25:54 +00:00
Mikhail Glushenkov
9f567e2e67
Implement 'forward_value' and 'forward_transformed_value'.
...
llvm-svn: 90770
2009-12-07 17:03:05 +00:00
Evan Cheng
79d3b53208
Pre-regalloc tale duplication. Work in progress.
...
llvm-svn: 90759
2009-12-07 10:15:19 +00:00
John Mosby
a8f0994ba7
fixed some typos in method comments, reworded some comments for clarity
...
llvm-svn: 90754
2009-12-07 09:06:37 +00:00
Oscar Fuentes
d4427a6b63
Fixes the Atomic implementation if compiled by MSVC compiler.
...
sys::cas_flag should be long on this platform, InterlockedAdd() is
defined only for the Itanium architecture (according to MSDN).
Patch by Michael Beck!
llvm-svn: 90748
2009-12-07 05:29:59 +00:00
Anton Korobeynikov
fadc276b81
Add MSP430 interrupt calling conv. No functionality change yet.
...
llvm-svn: 90738
2009-12-07 02:27:35 +00:00
Chris Lattner
c9a91632e1
remove extraneous comma clang warns about
...
llvm-svn: 90707
2009-12-06 16:58:41 +00:00
Chris Lattner
aee232cb03
Add helper methods for forming shift operations with a constant
...
shift amount.
llvm-svn: 90694
2009-12-06 01:56:22 +00:00
Dan Gohman
e6ce676cb2
Remove old DBG_LABEL code.
...
llvm-svn: 90669
2009-12-05 17:56:26 +00:00
Dan Gohman
d2797bf9ae
Remove the unused DisableLegalizeTypes option and related code.
...
llvm-svn: 90668
2009-12-05 17:51:33 +00:00
Bill Wendling
887646a585
Temporarily revert r90502. It was causing the llvm-gcc bootstrap on PPC to fail.
...
llvm-svn: 90653
2009-12-05 07:30:23 +00:00
Nick Lewycky
6f5e732b75
Document that memory use intrinsics may also return Def results.
...
llvm-svn: 90651
2009-12-05 06:37:52 +00:00
Dan Gohman
c9454cd34f
Make TargetSelectInstruction protected and called from FastISel.cpp
...
instead of SelectionDAGISel.cpp.
llvm-svn: 90636
2009-12-05 01:27:58 +00:00
Dan Gohman
f9654e9258
Remove the target hook TargetInstrInfo::BlockHasNoFallThrough in favor of
...
MachineBasicBlock::canFallThrough(), which is target-independent and more
thorough.
llvm-svn: 90634
2009-12-05 00:44:40 +00:00
David Greene
4ab7e5fa6a
Remove an unneeded include.
...
llvm-svn: 90627
2009-12-05 00:03:24 +00:00
David Greene
7ff6aa2e62
Fix a bad merge.
...
llvm-svn: 90616
2009-12-04 23:08:02 +00:00
David Greene
4c625161b2
Update the TargetInstrInfo interfaces so hasLoad/StoreFrom/ToStackSlot
...
can return a MachineMemOperand.
llvm-svn: 90615
2009-12-04 23:00:50 +00:00
Bob Wilson
b8002101b4
Fix indentation.
...
llvm-svn: 90613
2009-12-04 22:46:47 +00:00
Evan Cheng
0b005cade5
Add a pre-regalloc tail duplication pass.
...
llvm-svn: 90567
2009-12-04 09:42:45 +00:00
Chris Lattner
167f1dc040
add the start of a class used to handle phi translation in memdep and
...
gvn (this is just a skeleton so far). This will ultimately be used
to fix a nasty miscompilation with GVN.
llvm-svn: 90518
2009-12-04 02:10:16 +00:00
Mike Stump
cbbfda910a
Create yet another helper for Invoke.
...
llvm-svn: 90514
2009-12-04 01:53:15 +00:00
Mike Stump
9bc36df3e7
Add some helpers for Invoke to mirror CreateCall helpers.
...
llvm-svn: 90508
2009-12-04 01:26:26 +00:00
Jakob Stoklund Olesen
7c5af26d12
Also attempt trivial coalescing for live intervals that end in a copy.
...
The coalescer is supposed to clean these up, but when setting up parameters
for a function call, there may be copies to physregs. If the defining
instruction has been LICM'ed far away, the coalescer won't touch it.
The register allocation hint does not always work - when the register
allocator is backtracking, it clears the hints.
This patch takes care of a few more cases that r90163 missed.
llvm-svn: 90502
2009-12-04 00:16:04 +00:00
Devang Patel
fe7cf074f0
Add support to emit debug info for virtual functions and virtual base classes.
...
llvm-svn: 90474
2009-12-03 19:11:07 +00:00
Daniel Dunbar
63e2201f3e
Add an implementation of the delta debugging algorithm.
...
- This is a pretty slow / memory intensive implementation, and I will likely
change it to an iterative model, but it works.
llvm-svn: 90447
2009-12-03 11:12:42 +00:00
Andreas Neustifter
39cc7661ad
Use ProfileInfo-API in ProfileInfo Loader and do more assertions.
...
llvm-svn: 90446
2009-12-03 11:00:37 +00:00
Andreas Neustifter
83d47e4f5f
Converted ProfileInfo to template, added more API for ProfileInfo-preserving.
...
llvm-svn: 90445
2009-12-03 09:30:12 +00:00
Evan Cheng
1c3edb4fa8
Fill out codegen SSA updater. It's not yet tested.
...
llvm-svn: 90395
2009-12-03 02:31:43 +00:00
Chris Lattner
09df97d257
remove some dead std::ostream using code.
...
llvm-svn: 90366
2009-12-03 00:55:04 +00:00
Chris Lattner
9ce833945e
improve portability to avoid conflicting with std::next in c++'0x.
...
Patch by Howard Hinnant!
llvm-svn: 90365
2009-12-03 00:50:42 +00:00
Bill Wendling
db54e8c67c
This initial code is meant to convert TargetData to use an AbstractTypesUser so
...
that it doesn't have dangling pointers when abstract types are resolved. This
modifies it somewhat to address comments: making the "StructLayoutMap" an
anonymous structure, calling "removeAbstractTypeUser" when appropriate, and
adding asserts where helpful.
llvm-svn: 90362
2009-12-03 00:17:12 +00:00