Chris Lattner [Sat, 5 Jan 2008 06:47:58 +0000 (06:47 +0000)]
The current impl is really trivial, add some comments about how it can be made better.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45625
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 5 Jan 2008 06:14:16 +0000 (06:14 +0000)]
allow sinking to be enabled for the jit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45624
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 5 Jan 2008 06:10:42 +0000 (06:10 +0000)]
enable sinking and licm of loads from the argument area. I'd like to enable this
for remat, but can't due to an RA bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45623
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 5 Jan 2008 05:28:30 +0000 (05:28 +0000)]
simplify some code by using shorter accessors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45622
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 5 Jan 2008 05:26:26 +0000 (05:26 +0000)]
revert my previous patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45621
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 5 Jan 2008 05:19:56 +0000 (05:19 +0000)]
factor some code better to avoid redundancy between
isReallySideEffectFree and isReallyTriviallyReMaterializable. Why is a load from
a global considered side-effect-free but not rematable?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45620
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 5 Jan 2008 03:54:32 +0000 (03:54 +0000)]
getting the pic base has no side effects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45618
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 5 Jan 2008 02:33:22 +0000 (02:33 +0000)]
don't sink anything with side effects, this makes lots of stuff work, but sinks almost nothing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45617
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 5 Jan 2008 02:26:58 +0000 (02:26 +0000)]
X86 JIT PIC jumptable support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45616
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 5 Jan 2008 01:39:17 +0000 (01:39 +0000)]
fix a common crash.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45614
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 5 Jan 2008 01:22:42 +0000 (01:22 +0000)]
remove a couple more unsafe xforms in the face of overflow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45613
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 5 Jan 2008 01:18:20 +0000 (01:18 +0000)]
remove the (x-y) < 0 comparison xform, it miscompiles
things that are not equality comparisons, for example:
(
2147479553+4096)-
2147479553 < 0 != (
2147479553+4096) <
2147479553
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45612
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Sat, 5 Jan 2008 00:48:55 +0000 (00:48 +0000)]
I should not be allowed to commit when sleepy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45608
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Sat, 5 Jan 2008 00:43:37 +0000 (00:43 +0000)]
Didn't mean to commit this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45607
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Sat, 5 Jan 2008 00:42:45 +0000 (00:42 +0000)]
Didn't mean to commit this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45606
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 5 Jan 2008 00:41:47 +0000 (00:41 +0000)]
Combine MovePCtoStack + POP32r into one instruction MOVPC32r so it can be moved if needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45605
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Fri, 4 Jan 2008 23:57:37 +0000 (23:57 +0000)]
Move some more functionality from MRegisterInfo to TargetInstrInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45603
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 4 Jan 2008 20:54:55 +0000 (20:54 +0000)]
Don't recalculate the loop info and loop dominators analyses if they're
preserved.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45596
91177308-0d34-0410-b5e6-
96231b3b80d8
Wojciech Matyjewicz [Fri, 4 Jan 2008 20:04:08 +0000 (20:04 +0000)]
fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45595
91177308-0d34-0410-b5e6-
96231b3b80d8
Wojciech Matyjewicz [Fri, 4 Jan 2008 20:02:18 +0000 (20:02 +0000)]
fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45594
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 4 Jan 2008 17:31:56 +0000 (17:31 +0000)]
Testcase with non-integer "bitfields" (in quotes,
since they didn't actually need to be bitfields,
though they are marked as such).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45588
91177308-0d34-0410-b5e6-
96231b3b80d8
Gordon Henriksen [Fri, 4 Jan 2008 13:21:02 +0000 (13:21 +0000)]
Fix a typo in llvm.mli noticed by Alain Frisch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45585
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 4 Jan 2008 13:15:39 +0000 (13:15 +0000)]
Testcase for PR1386.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45583
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 4 Jan 2008 12:04:32 +0000 (12:04 +0000)]
doc_code-ify some code in this doc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45581
91177308-0d34-0410-b5e6-
96231b3b80d8
Gordon Henriksen [Fri, 4 Jan 2008 11:55:57 +0000 (11:55 +0000)]
Quote a path in the Ocaml makefile which is likely to include spaces on Windows.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45580
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 4 Jan 2008 10:50:28 +0000 (10:50 +0000)]
Unbreak tailcall opt in JIT.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45576
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 4 Jan 2008 10:46:51 +0000 (10:46 +0000)]
X86 PIC JIT support fixes: encoding bugs, add lazy pointer stubs support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45575
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 4 Jan 2008 08:59:18 +0000 (08:59 +0000)]
80-column violations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45574
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 4 Jan 2008 08:48:49 +0000 (08:48 +0000)]
Add that this preserves some analyses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45573
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 4 Jan 2008 08:11:03 +0000 (08:11 +0000)]
Move option to enable machine LICM into LLVMTargetMachine.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45572
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 4 Jan 2008 07:50:05 +0000 (07:50 +0000)]
Call the parent's getAnalysisUsage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45571
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 4 Jan 2008 07:36:53 +0000 (07:36 +0000)]
Add a really quick hack at a machine code sinking pass, enabled with --enable-sinking.
It is missing validity checks, so it is known broken. However, it is powerful enough
to compile this contrived code:
void test1(int C, double A, double B, double *P) {
double Tmp = A*A+B*B;
*P = C ? Tmp : A;
}
into:
_test1:
movsd 8(%esp), %xmm0
cmpl $0, 4(%esp)
je LBB1_2 # entry
LBB1_1: # entry
movsd 16(%esp), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
LBB1_2: # entry
movl 24(%esp), %eax
movsd %xmm0, (%eax)
ret
instead of:
_test1:
movsd 16(%esp), %xmm0
mulsd %xmm0, %xmm0
movsd 8(%esp), %xmm1
movapd %xmm1, %xmm2
mulsd %xmm2, %xmm2
addsd %xmm0, %xmm2
cmpl $0, 4(%esp)
je LBB1_2 # entry
LBB1_1: # entry
movapd %xmm2, %xmm1
LBB1_2: # entry
movl 24(%esp), %eax
movsd %xmm1, (%eax)
ret
woo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45570
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 4 Jan 2008 06:41:45 +0000 (06:41 +0000)]
remove dead #includes and reorder the rest.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45569
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 4 Jan 2008 05:04:53 +0000 (05:04 +0000)]
Fix PR1896
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45568
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 4 Jan 2008 04:38:35 +0000 (04:38 +0000)]
Change the builtin matcher to emit a decision tree, which should help out
the VC++ 'nesting depth' issue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45567
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 4 Jan 2008 04:34:14 +0000 (04:34 +0000)]
fix nesting issues.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45566
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 4 Jan 2008 04:33:49 +0000 (04:33 +0000)]
fix validation issues.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45565
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 4 Jan 2008 04:32:38 +0000 (04:32 +0000)]
improve the description of types, patch by Alain Frisch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45564
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 4 Jan 2008 03:32:52 +0000 (03:32 +0000)]
Don't let IntrinsicID be uninitialized if it doesn't match.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45563
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 4 Jan 2008 02:22:21 +0000 (02:22 +0000)]
Correct order of parameters.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45562
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 3 Jan 2008 23:02:16 +0000 (23:02 +0000)]
Remove the default else. This was ending in code that looked like this:
if (!strcmp(Target, "x86")) {
// ...
}
else
IntrinsicID = Intrinsic::not_intrinsic;
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45557
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 3 Jan 2008 22:15:32 +0000 (22:15 +0000)]
Remove symbols that don't exist, remove tabs, fix comment typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45553
91177308-0d34-0410-b5e6-
96231b3b80d8
Chuck Rose III [Thu, 3 Jan 2008 19:53:03 +0000 (19:53 +0000)]
Adding new files to win32 build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45545
91177308-0d34-0410-b5e6-
96231b3b80d8
Gordon Henriksen [Thu, 3 Jan 2008 17:42:08 +0000 (17:42 +0000)]
Ignoring output files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45538
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 3 Jan 2008 16:56:04 +0000 (16:56 +0000)]
add info on walking preds/succs of a block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45537
91177308-0d34-0410-b5e6-
96231b3b80d8
Gordon Henriksen [Thu, 3 Jan 2008 16:47:34 +0000 (16:47 +0000)]
First steps in in X86 calling convention cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45536
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Thu, 3 Jan 2008 11:53:52 +0000 (11:53 +0000)]
Test for handling of large bit offset from a
variable field offset.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45534
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 3 Jan 2008 07:25:26 +0000 (07:25 +0000)]
don't hoist FP additions into unconditional adds + selects. This
could theoretically introduce a trap, but is also a performance issue.
This speeds up ptrdist/ks by 8%.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45533
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 3 Jan 2008 07:10:51 +0000 (07:10 +0000)]
Fix PR1873, a problem finding stat-related symbols on linux, due to
"libc_nonshared.a". Patch by Edwin Török!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45532
91177308-0d34-0410-b5e6-
96231b3b80d8
Gordon Henriksen [Thu, 3 Jan 2008 03:32:33 +0000 (03:32 +0000)]
Trying that again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45529
91177308-0d34-0410-b5e6-
96231b3b80d8
Gordon Henriksen [Thu, 3 Jan 2008 03:21:18 +0000 (03:21 +0000)]
Fix a compile error on Windows.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45528
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 3 Jan 2008 02:56:28 +0000 (02:56 +0000)]
Change MachineRelocation::DoesntNeedFnStub to NeedStub. This fields will be used
for non-function GV relocations that require function address stubs (e.g. Mac OS X in non-static mode).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45527
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 3 Jan 2008 01:25:31 +0000 (01:25 +0000)]
don't access element zero of an array of size zero.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45526
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 3 Jan 2008 01:20:12 +0000 (01:20 +0000)]
Remove the function attr cache for intrinsics. This does not maintain the
refcount on these correctly, and can end up referring to deleted
attributes. This fixes PR1881.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45525
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 3 Jan 2008 00:29:27 +0000 (00:29 +0000)]
Don't create a new ParamAttrsList (which copies the vector) just to
get a profile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45524
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Thu, 3 Jan 2008 00:26:42 +0000 (00:26 +0000)]
An example for which the TYPE_SIZE was being set from
the initial value, while the type fields were not (this
is a qualified union type, so not all fields are always
present). This resulted in the size of the corresponding
LLVM type being larger than the gcc TYPE_SIZE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45522
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Thu, 3 Jan 2008 00:17:02 +0000 (00:17 +0000)]
Test handling of records for which the fields are
not ordered by offset.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45520
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 3 Jan 2008 00:10:22 +0000 (00:10 +0000)]
move some code out of line, rearrange a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45519
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 3 Jan 2008 00:09:47 +0000 (00:09 +0000)]
Disallow copying explicitly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45518
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 2 Jan 2008 23:42:30 +0000 (23:42 +0000)]
Split param attr implementation out from Function.cpp into its
own file. Don't #include ParameterAttributes.h into any major
public header files: just move methods out of line as appropriate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45517
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 2 Jan 2008 23:41:05 +0000 (23:41 +0000)]
add missing #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45516
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 2 Jan 2008 23:38:59 +0000 (23:38 +0000)]
X86 PIC JIT bug fix: relocations for constantpool and jumptable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45515
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 2 Jan 2008 23:10:45 +0000 (23:10 +0000)]
remove blob of #if'd out code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45512
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 2 Jan 2008 22:21:45 +0000 (22:21 +0000)]
fix this to use a valid triple.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45509
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 2 Jan 2008 22:18:33 +0000 (22:18 +0000)]
Inverted argument order for ImmutableMap::Profile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45507
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 2 Jan 2008 22:03:27 +0000 (22:03 +0000)]
Fix a build issue on cygwin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45506
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 2 Jan 2008 21:31:48 +0000 (21:31 +0000)]
Added iterator and profiling (i.e. FoldingSetNodeID) support to ImmutableMap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45503
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 2 Jan 2008 21:30:58 +0000 (21:30 +0000)]
Fix PR1888, patch by Wilhansen Li.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45501
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 2 Jan 2008 21:24:22 +0000 (21:24 +0000)]
Fix a build problem with VC++ by not doing the target prefix
comparison for every builtin. This reduces the depth of
the if/elseif chain dramatically.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45500
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 2 Jan 2008 21:10:54 +0000 (21:10 +0000)]
Use the correct MachineRegisterInfo object.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45499
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 2 Jan 2008 21:10:40 +0000 (21:10 +0000)]
Machine LICM will check that operands are defined outside of the loop. Also
check that register isn't 0 before going further.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45498
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 2 Jan 2008 20:47:37 +0000 (20:47 +0000)]
Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45496
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 2 Jan 2008 19:48:24 +0000 (19:48 +0000)]
verify that aligned common support doesn't break.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45495
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 2 Jan 2008 19:44:55 +0000 (19:44 +0000)]
darwin9 and above support aligned common symbols.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45494
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 2 Jan 2008 19:35:16 +0000 (19:35 +0000)]
leopard and above support alignment for common symbols.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45493
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 2 Jan 2008 19:32:43 +0000 (19:32 +0000)]
Use the new architecture to get the containing machine basic block for a machine
instruction. Also, use "splice" to move the new instruction instead of
remove/insert (where it was leaking memory anyway).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45492
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Wed, 2 Jan 2008 02:49:20 +0000 (02:49 +0000)]
Don't be rude, emit debugging info where asked to.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45485
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 1 Jan 2008 21:11:32 +0000 (21:11 +0000)]
Move some more instruction creation methods from RegisterInfo into InstrInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45484
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 1 Jan 2008 21:08:22 +0000 (21:08 +0000)]
Make MachineRegisterInfo::getVRegDef more efficient by aiming the keep the def of the vreg at the start of the list, so the list doesn't need to be traversed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45483
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 1 Jan 2008 20:36:19 +0000 (20:36 +0000)]
switch the register iterator to act more like hte LLVM value iterator: dereferencing
it now returns the machineinstr of the use. To get the operand, use I.getOperand().
Add a new MachineRegisterInfo::replaceRegWith, which is basically like
Value::replaceAllUsesWith.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45482
91177308-0d34-0410-b5e6-
96231b3b80d8
Gordon Henriksen [Tue, 1 Jan 2008 05:50:53 +0000 (05:50 +0000)]
Adding C bindings for SwitchInst::addCase.
Patch by Bryan O'Sullivan!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45481
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 1 Jan 2008 03:07:29 +0000 (03:07 +0000)]
Add a trivial but handy function to efficiently return the machine
instruction that defines the specified vreg. Crazy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45480
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 1 Jan 2008 02:55:32 +0000 (02:55 +0000)]
add efficient iteration support for register use/def's
within a machine function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45479
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 1 Jan 2008 01:34:36 +0000 (01:34 +0000)]
Update this testcase. The output needs to be disabled to pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45478
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 1 Jan 2008 01:12:31 +0000 (01:12 +0000)]
Implement automatically updated def/use lists for all MachineInstr register
operands. The lists are currently kept in MachineRegisterInfo, but it does
not yet provide an iterator interface to them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45477
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 1 Jan 2008 01:05:34 +0000 (01:05 +0000)]
Fix a bug in my previous patch: refer to the impl not the pure virtual version. It's unclear why gcc would ever compile this...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45476
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 1 Jan 2008 01:03:04 +0000 (01:03 +0000)]
Fix a problem where lib/Target/TargetInstrInfo.h would include and use
a header file from libcodegen. This violates a layering order: codegen
depends on target, not the other way around. The fix to this is to
split TII into two classes, TII and TargetInstrInfoImpl, which defines
stuff that depends on libcodegen. It is defined in libcodegen, where
the base is not.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45475
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 31 Dec 2007 23:58:31 +0000 (23:58 +0000)]
Factor out makefile dependency generation better.
Don't include system headers in the .d files.
Don't use $@ in the makefile rules, as there are two possible targets it could resolve to: use the one that we need explicitly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45473
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 31 Dec 2007 18:35:50 +0000 (18:35 +0000)]
Fix PR1833 - eh.exception and eh.selector return two
values, which means doing extra legalization work.
It would be easier to get this kind of thing right if
there was some documentation...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45472
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 31 Dec 2007 06:32:00 +0000 (06:32 +0000)]
Move copyRegToReg from MRegisterInfo to TargetInstrInfo. This is part of the
Machine-level API cleanup instigated by Chris.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45470
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 31 Dec 2007 04:56:33 +0000 (04:56 +0000)]
properly encapsulate the parent field of MBB and MI with get/set accessors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45469
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 31 Dec 2007 04:16:08 +0000 (04:16 +0000)]
update a couple of references to SSARegMap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45468
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 31 Dec 2007 04:13:23 +0000 (04:13 +0000)]
Rename SSARegMap -> MachineRegisterInfo in keeping with the idea
that "machine" classes are used to represent the current state of
the code being compiled. Given this expanded name, we can start
moving other stuff into it. For now, move the UsedPhysRegs and
LiveIn/LoveOuts vectors from MachineFunction into it.
Update all the clients to match.
This also reduces some needless #includes, such as MachineModuleInfo
from MachineFunction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45467
91177308-0d34-0410-b5e6-
96231b3b80d8
Gordon Henriksen [Mon, 31 Dec 2007 01:45:55 +0000 (01:45 +0000)]
Removing obsolete files from the Xcode project.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45466
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 30 Dec 2007 23:40:31 +0000 (23:40 +0000)]
slightly simplify and document SSARegMap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45465
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 30 Dec 2007 23:10:15 +0000 (23:10 +0000)]
Add new shorter predicates for testing machine operands for various types:
e.g. MO.isMBB() instead of MO.isMachineBasicBlock(). I don't plan on
switching everything over, so new clients should just start using the
shorter names.
Remove old long accessors, switching everything over to use the short
accessor: getMachineBasicBlock() -> getMBB(),
getConstantPoolIndex() -> getIndex(), setMachineBasicBlock -> setMBB(), etc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45464
91177308-0d34-0410-b5e6-
96231b3b80d8
Gordon Henriksen [Sun, 30 Dec 2007 22:48:58 +0000 (22:48 +0000)]
Another backwards compatibility fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45463
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 30 Dec 2007 22:24:06 +0000 (22:24 +0000)]
- rename opType -> OpKind and contents -> Contents.
- eliminate the auxInfo union, merging it into the contents union. This shaves
4 bytes off MachineOperand on a 32-bit machine.
- Use accessors in ctor methods.
- Add comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45462
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 30 Dec 2007 21:56:09 +0000 (21:56 +0000)]
More cleanups for MachineOperand:
- Eliminate the static "print" method for operands, moving it
into MachineOperand::print.
- Change various set* methods for register flags to take a bool
for the value to set it to. Remove unset* methods.
- Group methods more logically by operand flavor in MachineOperand.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45461
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 30 Dec 2007 21:31:53 +0000 (21:31 +0000)]
MachineOperand:
- Add getParent() accessors.
- Move SubReg out of the AuxInfo union, to make way for future changes.
- Remove the getImmedValue/setImmedValue methods.
- in some MachineOperand::Create* methods, stop initializing fields that are dead.
MachineInstr:
- Delete one copy of the MachineInstr printing code, now there is only one dump
format and one copy of the code.
- Make MachineOperand use the parent field to get info about preg register names if
no target info is otherwise available.
- Move def/use/kill/dead flag printing to the machineoperand printer, so they are
always printed for an operand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45460
91177308-0d34-0410-b5e6-
96231b3b80d8