oota-llvm.git
15 years agouse specialized accessor instead of plain getOperand(0)
Gabor Greif [Fri, 16 Jan 2009 18:40:27 +0000 (18:40 +0000)]
use specialized accessor instead of plain getOperand(0)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62330 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAlign source code.
Devang Patel [Fri, 16 Jan 2009 18:01:58 +0000 (18:01 +0000)]
Align source code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62328 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix a "comparison between signed and unsigned integer expressions"
Dan Gohman [Fri, 16 Jan 2009 17:55:08 +0000 (17:55 +0000)]
Fix a "comparison between signed and unsigned integer expressions"
warning.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62327 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoReinstate r60509 from Dale:
Nick Lewycky [Fri, 16 Jan 2009 17:07:22 +0000 (17:07 +0000)]
Reinstate r60509 from Dale:
Make the debugging dump be a full line.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62325 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoGet this building with gcc-4.4.
Duncan Sands [Fri, 16 Jan 2009 15:54:57 +0000 (15:54 +0000)]
Get this building with gcc-4.4.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62322 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoGrammar fix.
Duncan Sands [Fri, 16 Jan 2009 09:29:46 +0000 (09:29 +0000)]
Grammar fix.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62319 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRegistry.h should not depend on CommandLine.h.
Mikhail Glushenkov [Fri, 16 Jan 2009 07:02:28 +0000 (07:02 +0000)]
Registry.h should not depend on CommandLine.h.

Split Support/Registry.h into two files so that we have less to
recompile every time CommandLine.h is changed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62312 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoThis is now passing.
Evan Cheng [Fri, 16 Jan 2009 06:59:14 +0000 (06:59 +0000)]
This is now passing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62308 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDelete trailing whitespace.
Mikhail Glushenkov [Fri, 16 Jan 2009 06:53:46 +0000 (06:53 +0000)]
Delete trailing whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62307 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoReverting back 62301.
Sanjiv Gupta [Fri, 16 Jan 2009 05:06:35 +0000 (05:06 +0000)]
Reverting back 62301.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62304 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFew targets do not have a single directive to emit global constants.
Sanjiv Gupta [Fri, 16 Jan 2009 02:45:46 +0000 (02:45 +0000)]
Few targets do not have a single directive to emit global constants.
For example, PIC16 needs to break a long or int constant into mulitple parts and emit multiple directives. So Allow targets to overried EmitConstantValueOnly().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62301 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoARMCompilationCallback should not save / restore vfp registers if vfp is not available.
Evan Cheng [Fri, 16 Jan 2009 02:16:37 +0000 (02:16 +0000)]
ARMCompilationCallback should not save / restore vfp registers if vfp is not available.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62299 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoValidate debug info values only if DwarfDebug is initialized.
Devang Patel [Fri, 16 Jan 2009 02:15:14 +0000 (02:15 +0000)]
Validate debug info values only if DwarfDebug is initialized.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62298 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoClean up previous cast optimization a bit. Also make zext elimination a bit more...
Evan Cheng [Fri, 16 Jan 2009 02:11:43 +0000 (02:11 +0000)]
Clean up previous cast optimization a bit. Also make zext elimination a bit more aggressive: if it's not necessary to emit an AND (i.e. high bits are already zero), it's profitable to evaluate the operand at a different type.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62297 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd support for instructions with multiple ComplexPatterns, by
Dan Gohman [Fri, 16 Jan 2009 02:05:52 +0000 (02:05 +0000)]
Add support for instructions with multiple ComplexPatterns, by
adding more information to the temporary variables names so that
they don't conflict.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62296 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAny debug info symbol is only valid if atleast one compile unit is seen.
Devang Patel [Fri, 16 Jan 2009 01:49:46 +0000 (01:49 +0000)]
Any debug info symbol is only valid if atleast one compile unit is seen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62294 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoInitial hazard recognizer support in post-pass scheduling. This includes
Dan Gohman [Fri, 16 Jan 2009 01:33:36 +0000 (01:33 +0000)]
Initial hazard recognizer support in post-pass scheduling. This includes
a new toy hazard recognizier heuristic which attempts to direct the
scheduler to avoid clumping large groups of loads or stores too densely.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62291 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDo not stumble over forward declared struct member.
Devang Patel [Fri, 16 Jan 2009 00:50:53 +0000 (00:50 +0000)]
Do not stumble over forward declared struct member.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62288 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoValidate dbg_* intrinsics before lowering them.
Devang Patel [Thu, 15 Jan 2009 23:41:32 +0000 (23:41 +0000)]
Validate dbg_* intrinsics before lowering them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62286 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdded missing support to widen an operand from a bit convert.
Mon P Wang [Thu, 15 Jan 2009 22:43:38 +0000 (22:43 +0000)]
Added missing support to widen an operand from a bit convert.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62285 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoGeneralize the HazardRecognizer interface so that it can be used
Dan Gohman [Thu, 15 Jan 2009 22:18:12 +0000 (22:18 +0000)]
Generalize the HazardRecognizer interface so that it can be used
to support MachineInstr-based scheduling in addition to
SDNode-based scheduling.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62284 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSimplify the MachineLICM pass by having it only traverse outer
Dan Gohman [Thu, 15 Jan 2009 22:01:38 +0000 (22:01 +0000)]
Simplify the MachineLICM pass by having it only traverse outer
loops, hoisting instructions all the way out in one step rather
than hoisting them one nest level at a time. Also, make a few
other code simplifications. This speeds up MachineLICM
by several fold.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62283 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix Alpha test and support for private linkage.
Rafael Espindola [Thu, 15 Jan 2009 21:51:46 +0000 (21:51 +0000)]
Fix Alpha test and support for private linkage.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62282 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoExpand insert/extract of a <4 x i32> with a variable index.
Mon P Wang [Thu, 15 Jan 2009 21:10:20 +0000 (21:10 +0000)]
Expand insert/extract of a <4 x i32> with a variable index.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62281 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd the private linkage.
Rafael Espindola [Thu, 15 Jan 2009 20:18:42 +0000 (20:18 +0000)]
Add the private linkage.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62279 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse lightweight DebugInfo objects directly.
Devang Patel [Thu, 15 Jan 2009 19:26:23 +0000 (19:26 +0000)]
Use lightweight DebugInfo objects directly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62276 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMove a few containers out of ScheduleDAGInstrs::BuildSchedGraph
Dan Gohman [Thu, 15 Jan 2009 19:20:50 +0000 (19:20 +0000)]
Move a few containers out of ScheduleDAGInstrs::BuildSchedGraph
and into the ScheduleDAGInstrs class, so that they don't get
destructed and re-constructed for each block. This fixes a
compile-time hot spot in the post-pass scheduler.

To help facilitate this, tidy and do some minor reorganization
in the scheduler constructor functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62275 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd comment to explain my previous commit, as asked by Chris
Nuno Lopes [Thu, 15 Jan 2009 18:40:57 +0000 (18:40 +0000)]
add comment to explain my previous commit, as asked by Chris

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62272 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoavoid using iterators when they get invalidated potentially
Gabor Greif [Thu, 15 Jan 2009 18:40:09 +0000 (18:40 +0000)]
avoid using iterators when they get invalidated potentially
this fixes PR3332

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62271 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse variable's context to identify respective DbgScope.
Devang Patel [Thu, 15 Jan 2009 18:25:17 +0000 (18:25 +0000)]
Use variable's context to identify respective DbgScope.
Use light weight DebugInfo object directly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62269 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd load-folding table entries for BT*ri8 instructions.
Dan Gohman [Thu, 15 Jan 2009 17:57:09 +0000 (17:57 +0000)]
Add load-folding table entries for BT*ri8 instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62267 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake getWidenVectorType const; this file was missed in the
Dan Gohman [Thu, 15 Jan 2009 17:39:39 +0000 (17:39 +0000)]
Make getWidenVectorType const; this file was missed in the
previous commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62266 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake getWidenVectorType const.
Dan Gohman [Thu, 15 Jan 2009 17:34:08 +0000 (17:34 +0000)]
Make getWidenVectorType const.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62265 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoEliminate a redundant check.
Evan Cheng [Thu, 15 Jan 2009 17:09:07 +0000 (17:09 +0000)]
Eliminate a redundant check.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62264 91177308-0d34-0410-b5e6-96231b3b80d8

15 years ago- Teach CanEvaluateInDifferentType of this xform: sext (zext ty1), ty2 -> zext ty2
Evan Cheng [Thu, 15 Jan 2009 17:01:23 +0000 (17:01 +0000)]
- Teach CanEvaluateInDifferentType of this xform: sext (zext ty1), ty2 -> zext ty2
- Looking at the number of sign bits of the a sext instruction to determine  whether new trunc + sext pair should be added when its source is being evaluated in a different type.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62263 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMore consts on TargetLowering references.
Dan Gohman [Thu, 15 Jan 2009 16:58:17 +0000 (16:58 +0000)]
More consts on TargetLowering references.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62262 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse const with TargetLowering references in a few more places.
Dan Gohman [Thu, 15 Jan 2009 16:43:02 +0000 (16:43 +0000)]
Use const with TargetLowering references in a few more places.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62260 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoConst-qualify getPreIndexedAddressParts and friends.
Dan Gohman [Thu, 15 Jan 2009 16:29:45 +0000 (16:29 +0000)]
Const-qualify getPreIndexedAddressParts and friends.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62259 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDon't fold address calculations which use negative offsets into
Richard Osborne [Thu, 15 Jan 2009 11:32:30 +0000 (11:32 +0000)]
Don't fold address calculations which use negative offsets into
the ADDRspii addressing mode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62258 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdate the operands used when building LDAWSP instructions to match the .td
Richard Osborne [Thu, 15 Jan 2009 11:18:53 +0000 (11:18 +0000)]
Update the operands used when building LDAWSP instructions to match the .td
changes in the last commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62257 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agominor refactoring: use a more specific API
Gabor Greif [Thu, 15 Jan 2009 11:10:44 +0000 (11:10 +0000)]
minor refactoring: use a more specific API

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62256 91177308-0d34-0410-b5e6-96231b3b80d8

15 years ago- Convert remaining i64 custom lowering into custom instruction emission
Scott Michel [Thu, 15 Jan 2009 04:41:47 +0000 (04:41 +0000)]
- Convert remaining i64 custom lowering into custom instruction emission
  sequences in SPUDAGToDAGISel.cpp and SPU64InstrInfo.td, killing custom
  DAG node types as needed.
- i64 mul is now a legal instruction, but emits an instruction sequence
  that stretches tblgen and the imagination, as well as violating laws of
  several small countries and most southern US states (just kidding, but
  looking at a function with 80+ parameters is really weird and just plain
  wrong.)
- Update tests as needed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62254 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSome small documentation fixes.
Mikhail Glushenkov [Thu, 15 Jan 2009 02:42:40 +0000 (02:42 +0000)]
Some small documentation fixes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62251 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoClarify the documentation a bit.
Mikhail Glushenkov [Thu, 15 Jan 2009 02:04:54 +0000 (02:04 +0000)]
Clarify the documentation a bit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62249 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix PR3325, a miscompilation of invokes by IPSCCP. Patch by Jay Foad!
Chris Lattner [Wed, 14 Jan 2009 21:01:16 +0000 (21:01 +0000)]
Fix PR3325, a miscompilation of invokes by IPSCCP.  Patch by Jay Foad!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62244 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoxfail for now.
Devang Patel [Wed, 14 Jan 2009 20:10:24 +0000 (20:10 +0000)]
xfail for now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62243 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd pseudo instructions to the XCore for (load|store|load address) of a
Richard Osborne [Wed, 14 Jan 2009 18:26:46 +0000 (18:26 +0000)]
Add pseudo instructions to the XCore for (load|store|load address) of a
frame index. eliminateFrameIndex will replace these instructions with
(LDWSP|STWSP|LDAWSP) or (LDW|STW|LDAWF) if a frame pointer is in use.

This fixes PR 3324. Previously we used LDWSP, STWSP, LDAWSP before frame
pointer elimination. However since they were marked as implicitly using
SP they could not be rematerialised.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62238 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofix crash in the case when some arg is null
Nuno Lopes [Wed, 14 Jan 2009 17:51:41 +0000 (17:51 +0000)]
fix crash in the case when some arg is null

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62236 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agominor simplification
Gabor Greif [Wed, 14 Jan 2009 17:09:04 +0000 (17:09 +0000)]
minor simplification

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62232 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix the time regression I introduced in 464.h264ref with
Dale Johannesen [Wed, 14 Jan 2009 02:35:31 +0000 (02:35 +0000)]
Fix the time regression I introduced in 464.h264ref with
my earlier patch to this file.

The issue there was that all uses of an IV inside a loop
are actually references to Base[IV*2], and there was one
use outside that was the same but LSR didn't see the base
or the scaling because it didn't recurse into uses outside
the loop; thus, it used base+IV*scale mode inside the loop
instead of pulling base out of the loop.  This was extra bad
because register pressure later forced both base and IV into
memory.  Doing that recursion, at least enough
to figure out addressing modes, is a good idea in general;
the change in AddUsersIfInteresting does this.  However,
there were side effects....

It is also possible for recursing outside the loop to
introduce another IV where there was only 1 before (if
the refs inside are not scaled and the ref outside is).
I don't think this is a common case, but it's in the testsuite.
It is right to be very aggressive about getting rid of
such introduced IVs (CheckForIVReuse and the handling of
nonzero RewriteFactor in StrengthReduceStridedIVUsers).
In the testcase in question the new IV produced this way
has both a nonconstant stride and a nonzero base, neither
of which was handled before.  And when inserting
new code that feeds into a PHI, it's right to put such
code at the original location rather than in the PHI's
immediate predecessor(s) when the original location is outside
the loop (a case that couldn't happen before)
(RewriteInstructionToUseNewBase); better to avoid making
multiple copies of it in this case.

Also, the mechanism for keeping SCEV's corresponding to GEP's
no longer works, as the GEP might change after its SCEV
is remembered, invalidating the SCEV, and we might get a bad
SCEV value when looking up the GEP again for a later loop.
This also couldn't happen before, as we weren't recursing
into GEP's outside the loop.

Also, when we build an expression that involves a (possibly
non-affine) IV from a different loop as well as an IV from
the one we're interested in (containsAddRecFromDifferentLoop),
don't recurse into that.  We can't do much with it and will
get in trouble if we try to create new non-affine IVs or something.

More testcases are coming.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62212 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake -o a prefix option.
Mikhail Glushenkov [Wed, 14 Jan 2009 02:02:16 +0000 (02:02 +0000)]
Make -o a prefix option.

Both 'llvmc -o file' and 'llvmc -ofile' should work.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62211 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDo not construct debug scope if RootScope *is* null.
Devang Patel [Wed, 14 Jan 2009 01:34:32 +0000 (01:34 +0000)]
Do not construct debug scope if RootScope *is* null.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62209 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd member template MallocAllocator::Allocate(Num) (to match the same function in...
Ted Kremenek [Wed, 14 Jan 2009 00:38:21 +0000 (00:38 +0000)]
Add member template MallocAllocator::Allocate(Num) (to match the same function in BumpPtrAllocator).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62202 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agorewrite OptimizeAwayTrappingUsesOfLoads to 1) avoid a temporary
Chris Lattner [Wed, 14 Jan 2009 00:12:58 +0000 (00:12 +0000)]
rewrite OptimizeAwayTrappingUsesOfLoads to 1) avoid a temporary
vector and extraneous loop over it, 2) not delete globals used by
phis/selects etc which could actually be useful.  This fixes PR3321.
Many thanks to Duncan for narrowing this down.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62201 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemovoe MachineModuleInfo methods (and related DebugInfoDesc class hierarchy) that...
Devang Patel [Tue, 13 Jan 2009 23:54:55 +0000 (23:54 +0000)]
Removoe MachineModuleInfo methods (and related DebugInfoDesc class  hierarchy) that were used to handle debug info.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62199 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofix memleaks
Nuno Lopes [Tue, 13 Jan 2009 23:35:49 +0000 (23:35 +0000)]
fix memleaks

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62198 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoBT appears to be available on all >= i386 chips.
Dan Gohman [Tue, 13 Jan 2009 23:27:15 +0000 (23:27 +0000)]
BT appears to be available on all >= i386 chips.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62196 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDon't use a BT instruction if the AND has multiple uses.
Dan Gohman [Tue, 13 Jan 2009 23:25:30 +0000 (23:25 +0000)]
Don't use a BT instruction if the AND has multiple uses.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62195 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDisable the register+memory forms of the bt instructions for now. Thanks
Dan Gohman [Tue, 13 Jan 2009 23:23:30 +0000 (23:23 +0000)]
Disable the register+memory forms of the bt instructions for now. Thanks
to Eli for pointing out that these forms don't ignore the high bits of
their index operands, and as such are not immediately suitable for use
by isel.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62194 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoKeep "has debug info" big in MachineModuleInfo to avoid circular dependency between...
Devang Patel [Tue, 13 Jan 2009 23:02:17 +0000 (23:02 +0000)]
Keep "has debug info" big in MachineModuleInfo to avoid circular dependency between AsmPrinter and CodeGen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62191 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUndo previous checkin.
Devang Patel [Tue, 13 Jan 2009 22:54:57 +0000 (22:54 +0000)]
Undo previous checkin.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62190 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix testsuite regressions from recursive inlining.
Dale Johannesen [Tue, 13 Jan 2009 22:43:37 +0000 (22:43 +0000)]
Fix testsuite regressions from recursive inlining.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62189 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse DwarfWriter to record dbg variables.
Devang Patel [Tue, 13 Jan 2009 21:44:10 +0000 (21:44 +0000)]
Use DwarfWriter to record dbg variables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62185 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse dwarf writer to decide whether the module has debug info or not.
Devang Patel [Tue, 13 Jan 2009 21:25:00 +0000 (21:25 +0000)]
Use dwarf writer to decide whether the module has debug info or not.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62184 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd bt instructions that take immediate operands.
Dan Gohman [Tue, 13 Jan 2009 20:33:23 +0000 (20:33 +0000)]
Add bt instructions that take immediate operands.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62180 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix a few more JIT encoding issues in the BT instructions.
Dan Gohman [Tue, 13 Jan 2009 20:32:45 +0000 (20:32 +0000)]
Fix a few more JIT encoding issues in the BT instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62179 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse assertions to check for conditions that should never happen.
Dan Gohman [Tue, 13 Jan 2009 20:25:24 +0000 (20:25 +0000)]
Use assertions to check for conditions that should never happen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62178 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoThe list-td and list-tdrr schedulers don't yet support physreg
Dan Gohman [Tue, 13 Jan 2009 20:24:13 +0000 (20:24 +0000)]
The list-td and list-tdrr schedulers don't yet support physreg
scheduling dependencies. Add assertion checks to help catch
this.

It appears the Mips target defaults to list-td, and it has a
regression test that uses a physreg dependence. Such code was
liable to be miscompiled, and now evokes an assertion failure.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62177 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake instcombine ensure that all allocas are explicitly aligned at at
Dan Gohman [Tue, 13 Jan 2009 20:18:38 +0000 (20:18 +0000)]
Make instcombine ensure that all allocas are explicitly aligned at at
least their preferred alignment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62176 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoChecking in conditionals, function call, arrays and libcalls implementation.
Sanjiv Gupta [Tue, 13 Jan 2009 19:18:47 +0000 (19:18 +0000)]
Checking in conditionals, function call, arrays and libcalls implementation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62174 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAvoid referring to edge D after the Succs or Preds arrays have
Dan Gohman [Tue, 13 Jan 2009 19:08:45 +0000 (19:08 +0000)]
Avoid referring to edge D after the Succs or Preds arrays have
been modified, to avoid trouble in the (unlikely) scenario that
D is a reference to an element in one of those arrays.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62173 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWhen replacing uses and the same node is reached
Duncan Sands [Tue, 13 Jan 2009 15:17:14 +0000 (15:17 +0000)]
When replacing uses and the same node is reached
via two paths, process it once not twice, d'oh!
Analysis, testcase and original patch thanks to
Mon Ping Wang.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62169 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMark this XFAIL for the moment.
Duncan Sands [Tue, 13 Jan 2009 15:15:46 +0000 (15:15 +0000)]
Mark this XFAIL for the moment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62168 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix some typos. Also, the WidenedVectors map
Duncan Sands [Tue, 13 Jan 2009 14:42:39 +0000 (14:42 +0000)]
Fix some typos.  Also, the WidenedVectors map
was not being cleaned by ExpungeNode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62167 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCorrect a comment - this is not a sign extension.
Duncan Sands [Tue, 13 Jan 2009 14:04:14 +0000 (14:04 +0000)]
Correct a comment - this is not a sign extension.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62166 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCorrect a comment.
Duncan Sands [Tue, 13 Jan 2009 13:48:44 +0000 (13:48 +0000)]
Correct a comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62165 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWind SCEV back in time, to Nov 18th. This 'fixes' PR3275, PR3294, PR3295,
Nick Lewycky [Tue, 13 Jan 2009 09:18:58 +0000 (09:18 +0000)]
Wind SCEV back in time, to Nov 18th. This 'fixes' PR3275, PR3294, PR3295,
PR3296 and PR3302.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62160 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd a new insertAfter method, patch by Tom Jablin!
Chris Lattner [Tue, 13 Jan 2009 07:43:51 +0000 (07:43 +0000)]
add a new insertAfter method, patch by Tom Jablin!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62158 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agomake -march=cpp handle the nocapture attribute, make it assert if it
Chris Lattner [Tue, 13 Jan 2009 07:22:22 +0000 (07:22 +0000)]
make -march=cpp handle the nocapture attribute, make it assert if it
sees attributes it doesn't know.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62155 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUn-tabify.
Evan Cheng [Tue, 13 Jan 2009 06:08:37 +0000 (06:08 +0000)]
Un-tabify.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62151 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix fallout from r62144. Evan, please double check this.
Owen Anderson [Tue, 13 Jan 2009 06:05:10 +0000 (06:05 +0000)]
Fix fallout from r62144.  Evan, please double check this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62150 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFIX llvm-gcc bootstrap on x86_64 linux. If a virtual register is copied to a physical...
Evan Cheng [Tue, 13 Jan 2009 03:57:45 +0000 (03:57 +0000)]
FIX llvm-gcc bootstrap on x86_64 linux. If a virtual register is copied to a physical register, it's not necessarily defined by a copy. We have to watch out it doesn't clobber any sub-register that might be live during its live interval. If the live interval crosses a basic block, then it's not safe to check with the less conservative check (by scanning uses and defs) because it's possible a sub-register might be live out of the block.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62144 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse DebugInfo interface to lower dbg_* intrinsics.
Devang Patel [Tue, 13 Jan 2009 00:35:13 +0000 (00:35 +0000)]
Use DebugInfo interface to lower dbg_* intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62127 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse DebugInfo interface to lower dbg_* intrinsics.
Devang Patel [Tue, 13 Jan 2009 00:32:17 +0000 (00:32 +0000)]
Use DebugInfo interface to lower dbg_* intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62126 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoStart using DebugInfo API to emit debug info.
Devang Patel [Tue, 13 Jan 2009 00:20:51 +0000 (00:20 +0000)]
Start using DebugInfo API to emit debug info.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62125 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDocument several current CodeGen limitations in LangRef.html.
Dan Gohman [Mon, 12 Jan 2009 23:12:39 +0000 (23:12 +0000)]
Document several current CodeGen limitations in LangRef.html.
Patches for any of these are welcome!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62120 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoEmit debug info, only if at least one compile unit is seen.
Devang Patel [Mon, 12 Jan 2009 23:09:42 +0000 (23:09 +0000)]
Emit debug info, only if at least one compile unit is seen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62118 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoIf multiple compile units are seen then emit them independently. In other words,...
Devang Patel [Mon, 12 Jan 2009 23:05:55 +0000 (23:05 +0000)]
If multiple compile units are seen then emit them independently. In other words, do not force all DIEs into first, whatever it is, compile unit.

Note, multiple compile unit support is not well tested (it did not work correctly until now anyway.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62116 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAvoid cast<>, use light weith wrapper directly.
Devang Patel [Mon, 12 Jan 2009 22:58:14 +0000 (22:58 +0000)]
Avoid cast<>, use light weith wrapper directly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62115 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse SrcLineInfo from DwarfWriter. The MachineModuleInfo copy will disappear soon.
Devang Patel [Mon, 12 Jan 2009 22:54:42 +0000 (22:54 +0000)]
Use SrcLineInfo from DwarfWriter. The MachineModuleInfo copy will disappear soon.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62114 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoEnable recursive inlining. Reduce inlining threshold
Dale Johannesen [Mon, 12 Jan 2009 22:11:50 +0000 (22:11 +0000)]
Enable recursive inlining.  Reduce inlining threshold
back to 200; 400 seems to be too high, loses more than
it gains.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62107 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd classof() methods to support isa<> and other related facilities.
Devang Patel [Mon, 12 Jan 2009 21:38:43 +0000 (21:38 +0000)]
Add classof() methods to support isa<> and other related facilities.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62104 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoThe LLVM Assembly Language Reference incorrectly stated that the
Dan Gohman [Mon, 12 Jan 2009 21:35:55 +0000 (21:35 +0000)]
The LLVM Assembly Language Reference incorrectly stated that the
prefix used for dll{import,export} is _imp__; it is actually __imp_.
Patch by Mahadevan R!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62103 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix the instructions to work even when PATH does not contain ".".
Dan Gohman [Mon, 12 Jan 2009 21:29:24 +0000 (21:29 +0000)]
Fix the instructions to work even when PATH does not contain ".".
Thanks to Martin Geisse for pointing this out!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62102 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRename getABITypeSize to getTypePaddedSize, as
Duncan Sands [Mon, 12 Jan 2009 20:38:59 +0000 (20:38 +0000)]
Rename getABITypeSize to getTypePaddedSize, as
suggested by Chris.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62099 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd DwarfWriter interface to mainipulate source location info.
Devang Patel [Mon, 12 Jan 2009 19:17:34 +0000 (19:17 +0000)]
Add DwarfWriter interface to mainipulate source location info.
( May be this info should be directly handled by the dwarf writer ? )

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62096 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoremove some dead options.
Chris Lattner [Mon, 12 Jan 2009 19:02:50 +0000 (19:02 +0000)]
remove some dead options.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62095 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoClear debug info at the end of function processing.
Devang Patel [Mon, 12 Jan 2009 18:48:36 +0000 (18:48 +0000)]
Clear debug info at the end of function processing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62092 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoThere is no need to maintain separate labelid list in the dwarf writer. It is not...
Devang Patel [Mon, 12 Jan 2009 18:41:00 +0000 (18:41 +0000)]
There is no need to maintain separate labelid list in the dwarf writer. It is not a good idea.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62090 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove some dead code from the days llvm had type planes.
Rafael Espindola [Mon, 12 Jan 2009 15:53:25 +0000 (15:53 +0000)]
Remove some dead code from the days  llvm had type planes.

There might be more dead code, but with llvm-gcc bootstrap broken on linux x86-64 it is had to test :-(

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62088 91177308-0d34-0410-b5e6-96231b3b80d8