OSDN Git Service
Dan Gohman [Tue, 17 Feb 2009 19:41:26 +0000 (19:41 +0000)]
Move dumpPassStructure out of line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64796
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 17 Feb 2009 19:34:54 +0000 (19:34 +0000)]
Tidy whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64791
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 17 Feb 2009 19:13:57 +0000 (19:13 +0000)]
Delete trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64784
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 17 Feb 2009 17:50:04 +0000 (17:50 +0000)]
This transform also applies to private linkage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64773
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 17 Feb 2009 15:57:39 +0000 (15:57 +0000)]
Fix 80-column violation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64766
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 17 Feb 2009 06:41:03 +0000 (06:41 +0000)]
A couple of places where reused use operands should be marked kill. This is exposed by recent availability fallthrough changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64745
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 17 Feb 2009 01:16:14 +0000 (01:16 +0000)]
add a horrible note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64719
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 17 Feb 2009 01:04:54 +0000 (01:04 +0000)]
--- Merging (from foreign repository) r64714 into '.':
U include/llvm/CodeGen/DebugLoc.h
U lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
U lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
U lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp
Enable debug location generation at -Os. This goes with the reapplication of the
r63639 patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64715
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 17 Feb 2009 00:15:08 +0000 (00:15 +0000)]
Testcase for rev. 64704
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64705
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 17 Feb 2009 00:13:06 +0000 (00:13 +0000)]
Strengthen the "non-constant stride must dominate loop preheader" check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64703
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 17 Feb 2009 00:10:53 +0000 (00:10 +0000)]
Simplify; fix some 80-column violations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64702
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 16 Feb 2009 23:14:14 +0000 (23:14 +0000)]
Delete trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64694
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 16 Feb 2009 23:02:21 +0000 (23:02 +0000)]
Fix EnforceKnownAlignment so that it doesn't ever reduce the alignment
of an alloca or global variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64693
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 16 Feb 2009 22:57:04 +0000 (22:57 +0000)]
Add llvm::RoundUpToAlignment.
- No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64691
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 16 Feb 2009 22:39:08 +0000 (22:39 +0000)]
Fix bug where APSInt::operator-- incremented instead of decremented.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64687
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 16 Feb 2009 19:24:29 +0000 (19:24 +0000)]
Test case for llvm-gcc rev. 64648.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64649
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Mon, 16 Feb 2009 04:26:53 +0000 (04:26 +0000)]
Fix typo caused by too much surfing, dudes...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64626
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 16 Feb 2009 02:57:42 +0000 (02:57 +0000)]
Delete this long-commented-out code. The situation it seems to have
been written for is no longer relevant with the elimination of
signed and unsigned types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64625
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 16 Feb 2009 00:56:15 +0000 (00:56 +0000)]
Rename IndVarsSimplify to IndVarSimplify, to be consistent with
the name used in the code that these tests are for.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64624
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 16 Feb 2009 00:44:23 +0000 (00:44 +0000)]
Change these tests to use regular loads instead of llvm.x86.sse2.loadu.dq.
Enhance instcombine to use the preferred field of
GetOrEnforceKnownAlignment in more cases, so that regular IR operations are
optimized in the same way that the intrinsics currently are.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64623
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sun, 15 Feb 2009 23:59:32 +0000 (23:59 +0000)]
Don't assume that a left-shift of a value with one bit set will have
one bit set, because the bit may be shifted off the end. Instead,
just check for a constant 1 being shifted. This is still sufficient
to handle all the cases in test/CodeGen/X86/bt.ll. This fixes PR3583.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64622
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sun, 15 Feb 2009 23:24:52 +0000 (23:24 +0000)]
MachineLICM now handles these cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64620
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 15 Feb 2009 23:06:14 +0000 (23:06 +0000)]
Demonstrate the act of including multiple space-separated parameter attributes,
by request on IRC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64619
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 15 Feb 2009 22:50:17 +0000 (22:50 +0000)]
Shoot! Remove this debugging line again!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64617
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 15 Feb 2009 22:49:17 +0000 (22:49 +0000)]
Don't discard definitions of common symbols. Not sure if this is the right fix.
Before this change, the program:
int var;
int main(void) { return 0; }
when run under 'nm -g' would show 'U var' with the gold plugin and
'B var' with gcc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64616
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 15 Feb 2009 22:47:25 +0000 (22:47 +0000)]
Update the list of function annotations for nocapture. All of these came up
when I was looking at functions used by python.
Highlights include, better largefile support (64-bit file sizes on 32-bit
systems), fputs string is nocapture, popen/pclose added (popen being noalias
return), modf and frexp and friends. Also added some missing 'break' statements
and combined identical sections.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64615
91177308-0d34-0410-b5e6-
96231b3b80d8
Nicolas Geoffray [Sun, 15 Feb 2009 20:49:23 +0000 (20:49 +0000)]
On 64bit we may have a personality function which requires 64 bits to
be encoded.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64600
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Sun, 15 Feb 2009 11:54:49 +0000 (11:54 +0000)]
Make this more useful for cleaning up after the
one-definition-rule llvm-gcc changes (coming soon
to a tree near you!).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64588
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Sun, 15 Feb 2009 11:32:31 +0000 (11:32 +0000)]
80-column violation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64586
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Sun, 15 Feb 2009 09:56:08 +0000 (09:56 +0000)]
If the target of an alias has internal linkage, then the
alias can be morphed into the target. Implement this
transform, and fix a crash in the existing transform at
the same time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64583
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sun, 15 Feb 2009 08:36:12 +0000 (08:36 +0000)]
Fix PR3522. It's not safe to sink into landing pad BB's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64582
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sun, 15 Feb 2009 06:06:15 +0000 (06:06 +0000)]
Fix pr3571: If stride is a value defined by an instruction, make sure it dominates the loop preheader. When IV users are strength reduced, the stride is inserted into the preheader. It could create a use before def situation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64579
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sun, 15 Feb 2009 03:20:37 +0000 (03:20 +0000)]
ifdef out unneeded if statement.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64575
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Sun, 15 Feb 2009 03:20:32 +0000 (03:20 +0000)]
Fix warning on gcc 4.3.
"system() declared with attribute warn_unused_result."
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64574
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Sun, 15 Feb 2009 03:20:03 +0000 (03:20 +0000)]
Whitespace fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64573
91177308-0d34-0410-b5e6-
96231b3b80d8
Cedric Venet [Sat, 14 Feb 2009 16:13:26 +0000 (16:13 +0000)]
Add mode_t to the config.h generated by cmake on win32. Used by clang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64555
91177308-0d34-0410-b5e6-
96231b3b80d8
Cedric Venet [Sat, 14 Feb 2009 16:06:42 +0000 (16:06 +0000)]
Unbreak the build on win32.
Cleanup some warning.
Remark: when struct/class are declared differently than they are defined, this make problem for VC++ since it seems to mangle class differently that struct. These error are very hard to understand and find. So please, try to keep your definition/declaration in sync.
Only tested with VS2008. hope it does not break anything. feel free to revert.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64554
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Sat, 14 Feb 2009 10:56:35 +0000 (10:56 +0000)]
Generalize some alias analysis logic from atomic
intrinsics to any IntrWriteArgMem intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64551
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Sat, 14 Feb 2009 08:41:25 +0000 (08:41 +0000)]
80-column violation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64550
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Sat, 14 Feb 2009 05:33:26 +0000 (05:33 +0000)]
The trampoline intrinsic can be marked IntrWriteArgMem,
now that this no longer implies nocapture.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64540
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Sat, 14 Feb 2009 05:16:25 +0000 (05:16 +0000)]
IntrWriteArgMem implies nocapture, but this wasn't
taken advantage of anywhere. Change the definition
of IntrWriteArgMem to no longer imply nocapture, and
explicitly add nocapture attributes everywhere (well,
not quite everywhere, because some of these intrinsics
did capture their arguments!). Also, make clear that
the lack of other side-effects does not exclude doing
volatile loads or stores - the atomic intrinsics do
these, yet they are all marked IntrWriteArgMem (this
change is safe because nothing exploited it).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64539
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 14 Feb 2009 03:30:05 +0000 (03:30 +0000)]
The x86-64 red zone is now being used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64535
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 14 Feb 2009 02:31:09 +0000 (02:31 +0000)]
Extend the IndVarSimplify support for promoting induction variables:
- Test for signed and unsigned wrapping conditions, instead of just
testing for non-negative induction ranges.
- Handle loops with GT comparisons, in addition to LT comparisons.
- Support more cases of induction variables that don't start at 0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64532
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 14 Feb 2009 02:26:50 +0000 (02:26 +0000)]
Clarify debug output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64531
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 14 Feb 2009 02:25:19 +0000 (02:25 +0000)]
Simplify some code. hasComputableLoopEvolution is overkill in this case.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64530
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Sat, 14 Feb 2009 00:19:28 +0000 (00:19 +0000)]
Testcase for llvm-gcc 64510.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64511
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 13 Feb 2009 22:36:38 +0000 (22:36 +0000)]
Teach x86 target -soft-float.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64496
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 13 Feb 2009 17:45:12 +0000 (17:45 +0000)]
In CodeGenPrepare's debug output, use WriteAsOperand instead of
printing getName(), so that unnamed values are printed correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64468
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 13 Feb 2009 17:36:42 +0000 (17:36 +0000)]
Complete the sentance in this comment. I have reservations
about the code it describes, but at least now the comment
is right.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64465
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 13 Feb 2009 17:36:13 +0000 (17:36 +0000)]
Correct a comment: since AccessArguments is now
being used for atomic intrinsics, it seems the
access may be volatile. No code was exploiting
the original non-volatile definition, so only
the comment needs changing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64464
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 13 Feb 2009 17:32:26 +0000 (17:32 +0000)]
If a function only reads memory, then we know that...
it only reads memory! The other change has no
functional effect, it just seems more logical to
go in order of decreasing knowledge.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64463
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Fri, 13 Feb 2009 17:08:33 +0000 (17:08 +0000)]
Mark strto* as readonly when the endptr is null.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64460
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Fri, 13 Feb 2009 15:31:46 +0000 (15:31 +0000)]
On strtod and friends, mark 'endptr' nocapture in the function prototype, and
mark the first argument nocapture if endptr=NULL for each particular call.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64453
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 13 Feb 2009 09:42:34 +0000 (09:42 +0000)]
Reapply r64301. These uses of "inline" can cause strange
link-time failures when building with optimization. Just
get rid of them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64449
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 13 Feb 2009 08:24:55 +0000 (08:24 +0000)]
Switch from new[] + delete[] to malloc + free since llvm does not catch C++ exceptions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64448
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 13 Feb 2009 07:54:34 +0000 (07:54 +0000)]
If new[] fails, return 0 rather then trying to dereference a null pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64444
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Fri, 13 Feb 2009 07:15:53 +0000 (07:15 +0000)]
Reapply r64300:
Make sure the SCC pass manager initializes any contained
function pass managers. Without this, simplify-libcalls
would add nocapture attributes when run on its own, but
not when run as part of -std-compile-opts or similar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64443
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Fri, 13 Feb 2009 07:06:27 +0000 (07:06 +0000)]
BasicAA was making the assumption that a local allocation which hadn't escaped
couldn't ever be the return of call instruction. However, it's quite possible
that said local allocation is itself the return of a function call. That's
what malloc and calloc are for, actually.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64442
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 13 Feb 2009 03:58:31 +0000 (03:58 +0000)]
Fix the code that checked if a SCEVAddRecExpr Start contains an
addrec in a different loop to check the value being added to
the accumulated Start value, not the Start value before it has
the new value added to it. This prevents LSR from going crazy
on the included testcase. Dale, please review.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64440
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Fri, 13 Feb 2009 02:35:20 +0000 (02:35 +0000)]
Remove non-DebugLoc versions of BuildMI.
"I got blisters on my fingers."
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64439
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Fri, 13 Feb 2009 02:34:39 +0000 (02:34 +0000)]
Remove non-DebugLoc versions of BuildMI from IA64, Mips.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64438
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Fri, 13 Feb 2009 02:33:27 +0000 (02:33 +0000)]
Remove non-DebugLoc versions of BuildMI from X86.
There were some that might even matter in X86FastISel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64437
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Fri, 13 Feb 2009 02:32:04 +0000 (02:32 +0000)]
missed file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64436
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Fri, 13 Feb 2009 02:31:35 +0000 (02:31 +0000)]
Remove non-DebugLoc versions of buildMI from Sparc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64435
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Fri, 13 Feb 2009 02:30:42 +0000 (02:30 +0000)]
Remove non-DebugLoc versions of BuildMI from Alpha and Cell.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64433
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Fri, 13 Feb 2009 02:29:03 +0000 (02:29 +0000)]
Remove refs to non-DebugLoc version of BuildMI from XCore, PIC16.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64432
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Fri, 13 Feb 2009 02:27:39 +0000 (02:27 +0000)]
Remove refs to non-DebugLoc version of BuildMI from PowerPC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64431
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Fri, 13 Feb 2009 02:26:21 +0000 (02:26 +0000)]
and one more file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64430
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Fri, 13 Feb 2009 02:25:56 +0000 (02:25 +0000)]
Remove refs to non-DebugLoc versions of BuildMI from ARM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64429
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 13 Feb 2009 02:16:35 +0000 (02:16 +0000)]
Revert this. It was breaking stuff.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64428
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 13 Feb 2009 02:01:04 +0000 (02:01 +0000)]
Turn off the old way of handling debug information in the code generator. Use
the new way, where all of the information is passed on SDNodes and machine
instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64427
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 13 Feb 2009 00:26:43 +0000 (00:26 +0000)]
Fix LSR's IV sorting function to explicitly sort by bitwidth
after sorting by stride value. This prevents it from missing
IV reuse opportunities in a host-sensitive manner.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64415
91177308-0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Thu, 12 Feb 2009 23:45:11 +0000 (23:45 +0000)]
Avoid order files for now, as they aren't supported in 3.79.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64412
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Thu, 12 Feb 2009 23:24:44 +0000 (23:24 +0000)]
Check in missing file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64410
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Thu, 12 Feb 2009 23:08:38 +0000 (23:08 +0000)]
Eliminate a couple of non-DebugLoc BuildMI variants.
Modify callers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64409
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 12 Feb 2009 22:19:27 +0000 (22:19 +0000)]
Teach IndVarSimplify to optimize code using the C "int" type for
loop induction on LP64 targets. When the induction variable is
used in addressing, IndVars now is usually able to inserst a
64-bit induction variable and eliminates the sign-extending cast.
This is also useful for code using C "short" types for
induction variables on targets with 32-bit addressing.
Inserting a wider induction variable is easy; the tricky part is
determining when trunc(sext(i)) expressions are no-ops. This
requires range analysis of the loop trip count. A common case is
when the original loop iteration starts at 0 and exits when the
induction variable is signed-less-than a fixed value; this case
is now handled.
This replaces IndVarSimplify's OptimizeCanonicalIVType. It was
doing the same optimization, but it was limited to loops with
constant trip counts, because it was running after the loop
rewrite, and the information about the original induction
variable is lost by that point.
Rename ScalarEvolution's executesAtLeastOnce to
isLoopGuardedByCond, generalize it to be able to test for
ICMP_NE conditions, and move it to be a public function so that
IndVars can use it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64407
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Thu, 12 Feb 2009 21:28:33 +0000 (21:28 +0000)]
Add suppport for ConstantExprs of shufflevectors whose result type is not equal to the
type of the vectors being shuffled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64401
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Thu, 12 Feb 2009 20:58:09 +0000 (20:58 +0000)]
Arrange to print constants that match "n" and "i" constraints
in inline asm as signed (what gcc does). Add partial support
for x86-specific "e" and "Z" constraints, with appropriate
signedness for printing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64400
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 12 Feb 2009 20:53:27 +0000 (20:53 +0000)]
Rename bugpoint's error message file so that if it somehow
gets left behind, it's less cryptic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64399
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 12 Feb 2009 18:08:24 +0000 (18:08 +0000)]
Add a utility function to LoopInfo to return the exit block
when the loop has exactly one exit, and make use of it in
LoopIndexSplit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64388
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 12 Feb 2009 17:38:23 +0000 (17:38 +0000)]
fix PR3538 for ARM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64384
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 12 Feb 2009 17:37:15 +0000 (17:37 +0000)]
fix PR3538 for PPC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64383
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 12 Feb 2009 17:33:11 +0000 (17:33 +0000)]
fix the X86 backend to just drop llvm.declare nodes for VLAs instead of
leaving them in the DAG and then getting selection errors. This is a
fix for PR3538.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64382
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 12 Feb 2009 17:29:01 +0000 (17:29 +0000)]
Adjust the sizes for a few SmallVectors to reflect their usage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64381
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 12 Feb 2009 17:23:20 +0000 (17:23 +0000)]
make fast isel fall back to selectiondags for VLA llvm.declare intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64379
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 12 Feb 2009 17:14:49 +0000 (17:14 +0000)]
Add operator->, patch by Ben Laurie!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64378
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 12 Feb 2009 17:04:57 +0000 (17:04 +0000)]
add PR
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64377
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 12 Feb 2009 16:36:26 +0000 (16:36 +0000)]
This code doesn't actually use the ExitingBlocks list.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64376
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 12 Feb 2009 10:32:17 +0000 (10:32 +0000)]
It's (currently) not safe to keep certain physical registers live across basic blocks, e.g. x86 fp stack registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64374
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 12 Feb 2009 09:52:13 +0000 (09:52 +0000)]
Oops. Last second clean up messed things up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64373
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 12 Feb 2009 09:43:23 +0000 (09:43 +0000)]
If availability info is kept when fallthrough into a bb, add the available registers to live-in set.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64372
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 12 Feb 2009 08:59:45 +0000 (08:59 +0000)]
Replace one of burr scheduling heuristic with something more sensible. Now calcMaxScratches simply compute the number of true data dependencies. This actually improve a couple of tests in dejagnu suite as many tests in llvm nightly test suite.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64369
91177308-0d34-0410-b5e6-
96231b3b80d8
Julien Lerouge [Thu, 12 Feb 2009 08:02:35 +0000 (08:02 +0000)]
Fix MingW build: define GTEST_OS_WINDOWS if OS is MingW, but disable
exceptions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64367
91177308-0d34-0410-b5e6-
96231b3b80d8
Julien Lerouge [Thu, 12 Feb 2009 07:39:10 +0000 (07:39 +0000)]
Fix MingW build, patch by Kenneth Boyd!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64366
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 12 Feb 2009 07:06:42 +0000 (07:06 +0000)]
Fix a nasty bug (PR3550) where the inline pass could incorrectly mark
calls with the tail marker when inlining them through an invoke. Patch,
testcase, and perfect analysis by Jay Foad!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64364
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 12 Feb 2009 07:00:35 +0000 (07:00 +0000)]
improve naming of values in GVN, patch by Jay Foad!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64363
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 12 Feb 2009 06:56:08 +0000 (06:56 +0000)]
fix PR3537: if resetting bbi back to the start of a block, we need to
forget about already inserted expressions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64362
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 12 Feb 2009 06:54:55 +0000 (06:54 +0000)]
rename test to avoid messing with tab completion of dates.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64361
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 12 Feb 2009 05:17:02 +0000 (05:17 +0000)]
Add method 'isSingleton()' to ImmutableSet. This returns true if the set contains exactly one element.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64359
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 12 Feb 2009 03:18:34 +0000 (03:18 +0000)]
Don't mark all args to strtod and friends as nocapture.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64352
91177308-0d34-0410-b5e6-
96231b3b80d8