Benjamin Kramer [Sat, 9 Mar 2013 18:25:40 +0000 (18:25 +0000)]
Test case hygiene.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176772
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Sat, 9 Mar 2013 18:24:26 +0000 (18:24 +0000)]
Remove unneeded const_cast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176771
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Sat, 9 Mar 2013 18:05:34 +0000 (18:05 +0000)]
Use forward declaration instead of #include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176770
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Sat, 9 Mar 2013 16:27:27 +0000 (16:27 +0000)]
LoopVectorizer: Ignore all dbg intrinisic
Ignore all DbgIntriniscInfo instructions instead of just DbgValueInst.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176769
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Sat, 9 Mar 2013 15:56:34 +0000 (15:56 +0000)]
LoopVectorizer: Ignore dbg.value instructions
We want vectorization to happen at -g. Ignore calls to the dbg.value intrinsic
and don't transfer them to the vectorized code.
radar://
13378964
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176768
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 9 Mar 2013 13:48:23 +0000 (13:48 +0000)]
TLI: Microoptimize calls to strlen+memcmp to strncmp.
The strlen+memcmp was hidden in a call to StringRef::operator==. We check if
there are any null bytes in the string upfront so we can simplify the comparison
Small speedup when compiling code with many function calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176766
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Sat, 9 Mar 2013 11:18:59 +0000 (11:18 +0000)]
Simplify code. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176765
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 9 Mar 2013 10:13:26 +0000 (10:13 +0000)]
Use the correct index variable. This is the meat of what was supposed to be in
r176751. Also, learn a lesson about applying patches by hand/eyeball.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176764
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 9 Mar 2013 09:32:16 +0000 (09:32 +0000)]
Commit the right files for r176762. Sigh.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176763
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 9 Mar 2013 09:31:44 +0000 (09:31 +0000)]
We need a shndx if the number of sections breaks SHN_LORESERVE. This condition
for choosing to emit a shndx was simply testing the wrong variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176762
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 9 Mar 2013 02:06:37 +0000 (02:06 +0000)]
Fix bug introduced in r176616 when making function identifier numbers stable.
Count the subprograms, not the compile units.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176751
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 9 Mar 2013 01:33:06 +0000 (01:33 +0000)]
Don't emit the extra checksum into the .gcda file if the user hasn't asked for
it. Fortunately, versions of gcov that predate the extra checksum also ignore
any extra data, so this isn't a problem. There will be a matching commit in
compiler-rt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176745
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 8 Mar 2013 23:00:13 +0000 (23:00 +0000)]
Remove wrong and unnecessary assertion.
PHIs are allowed to have multiple operand pairs per predecessor, and
this code works just fine when it happens.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176734
91177308-0d34-0410-b5e6-
96231b3b80d8
Jan Wen Voung [Fri, 8 Mar 2013 22:56:31 +0000 (22:56 +0000)]
Disable statistics on Release builds and move tests that depend on -stats.
Summary:
Statistics are still available in Release+Asserts (any +Asserts builds),
and stats can also be turned on with LLVM_ENABLE_STATS.
Move some of the FastISel stats that were moved under DEBUG()
back out of DEBUG(), since stats are disabled across the board now.
Many tests depend on grepping "-stats" output. Move those into
a orig_dir/Stats/. so that they can be marked as unsupported
when building without statistics.
Differential Revision: http://llvm-reviews.chandlerc.com/D486
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176733
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Fri, 8 Mar 2013 22:29:44 +0000 (22:29 +0000)]
Clean up out-of-date comments and some stray whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176729
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Ilseman [Fri, 8 Mar 2013 21:15:00 +0000 (21:15 +0000)]
Early exit from getAllocationData() and isFreeCall() for intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176722
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 8 Mar 2013 21:08:23 +0000 (21:08 +0000)]
Assert to bounds check MDNode::getOperand.
The getOperandPtr utility already bounds checks, but allows one-off-the-end.
This assert should catch the cases that could previously have been dereferencing
these one-off-the-end pointer. Happily, no cases of this came up with this
change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176721
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Ilseman [Fri, 8 Mar 2013 21:03:09 +0000 (21:03 +0000)]
Remove trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176720
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 8 Mar 2013 18:36:36 +0000 (18:36 +0000)]
No really, don't use end().
Clearly, this function is never actually called with the last
instruction in the function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176708
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 8 Mar 2013 18:17:46 +0000 (18:17 +0000)]
Remove -print-dbginfo as it is unused & bitrotten.
This pass hasn't been touched in two years & would fail with assertions against
the current debug info metadata format (the only test case for it still uses a
many-versions old debug info metadata format)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176707
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 8 Mar 2013 18:08:57 +0000 (18:08 +0000)]
Rewrite the physreg part of findLastUseBefore().
To find the last use of a register unit, start from the bottom and scan
upwards until a user is found.
<rdar://problem/
13353090>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176706
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 8 Mar 2013 18:08:54 +0000 (18:08 +0000)]
Avoid creating a SlotIndex from the end() iterator.
No test case, spotted by inspection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176705
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 8 Mar 2013 17:03:19 +0000 (17:03 +0000)]
Remove default from fully covered switch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176703
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 8 Mar 2013 17:01:18 +0000 (17:01 +0000)]
Force cpu in test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176702
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 8 Mar 2013 16:58:37 +0000 (16:58 +0000)]
Insert the reduction start value into the first bypass block to preserve domination.
Fixes PR15344.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176701
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 8 Mar 2013 15:37:11 +0000 (15:37 +0000)]
R600: Optimize another selectcc case
fold selectcc (selectcc x, y, a, b, cc), b, a, b, setne ->
selectcc x, y, a, b, cc
Reviewed-by: Christian König <christian.koenig@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176700
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 8 Mar 2013 15:37:09 +0000 (15:37 +0000)]
R600: Improve custom lowering of select_cc
Two changes:
1. Prefer SET* instructions when possible
2. Handle the CND*_INT case with floating-point args
Reviewed-by: Christian König <christian.koenig@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176699
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 8 Mar 2013 15:37:07 +0000 (15:37 +0000)]
R600: Change operation action from Custom to Expand for BR_CC
Reviewed-by: Christian König <christian.koenig@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176698
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 8 Mar 2013 15:37:05 +0000 (15:37 +0000)]
R600: Change operation action from Custom to Expand for SETCC
Reviewed-by: Christian König <christian.koenig@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176697
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 8 Mar 2013 15:37:03 +0000 (15:37 +0000)]
R600: Set BooleanContents to ZeroOrNegativeOneBooleanContent
Reviewed-by: Christian König <christian.koenig@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176696
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 8 Mar 2013 15:37:02 +0000 (15:37 +0000)]
LegalizeDAG: Respect the result of TLI.getBooleanContents() when expanding SETCC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176695
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 8 Mar 2013 15:36:57 +0000 (15:36 +0000)]
DAGCombiner: Use correct value type for checking legality of BR_CC v3
LegalizeDAG.cpp uses the value of the comparison operands when checking
the legality of BR_CC, so DAGCombiner should do the same.
v2:
- Expand more BR_CC value types for NVPTX
v3:
- Expand correct BR_CC value types for Hexagon, Mips, and XCore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176694
91177308-0d34-0410-b5e6-
96231b3b80d8
Vincent Lejeune [Fri, 8 Mar 2013 15:34:07 +0000 (15:34 +0000)]
R600: Change addresspace in fold-kcache.ll
AddressSpace definition has changed in a previous commit, reflect it
to avoid false failure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176693
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Fri, 8 Mar 2013 15:27:30 +0000 (15:27 +0000)]
AArch64: specify full triple in test as only Linux works for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176692
91177308-0d34-0410-b5e6-
96231b3b80d8
Christian Konig [Fri, 8 Mar 2013 14:44:00 +0000 (14:44 +0000)]
R600/SI: adjust test to recent changes
Signed-off-by: Christian König <christian.koenig@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176691
91177308-0d34-0410-b5e6-
96231b3b80d8
Jyotsna Verma [Fri, 8 Mar 2013 14:15:15 +0000 (14:15 +0000)]
Hexagon: Add patterns for zero extended loads from i1->i64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176689
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Fri, 8 Mar 2013 13:55:07 +0000 (13:55 +0000)]
AArch64: expand sincos operations, we don't support them.
Patch based on Mans Rullgard's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176688
91177308-0d34-0410-b5e6-
96231b3b80d8
Michel Danzer [Fri, 8 Mar 2013 10:58:01 +0000 (10:58 +0000)]
R600/SI: Use source scheduler
This is certainly not the last word on scheduling for this target, but
right now this allows a few apps to run / finish with radeonsi, most
notably UT2004 / Lightsmark. They fail to compile some shaders with the
default scheduler because it ends up trying to spill registers, which
we don't support yet (and which is probably a bad idea in general for
performance if it can be avoided).
NOTE: This is a candidate for the Mesa stable branch.
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176687
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 8 Mar 2013 05:40:34 +0000 (05:40 +0000)]
Add -verify-misched option.
This verifies live intervals both before and after scheduling. It's
useful for anyone hacking on live interval update.
Note that we don't yet pass verification all the time. We don't yet
handle updating nonallocatable live intervals perfectly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176685
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 8 Mar 2013 02:27:40 +0000 (02:27 +0000)]
Another test fix for r176671.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176679
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 8 Mar 2013 02:26:16 +0000 (02:26 +0000)]
Couple of test fixes for r176671.
Not sure why these aren't failing on my linux machine, but this should cover
it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176678
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 8 Mar 2013 02:21:08 +0000 (02:21 +0000)]
Revert r176154 in favor of a better approach.
Code generation makes some basic assumptions about the IR it's been given. In
particular, if there is only one 'invoke' in the function, then that invoke
won't be going away. However, with the advent of the `llvm.donothing' intrinsic,
those invokes may go away. If all of them go away, the landing pad no longer has
any users. This confuses the back-end, which asserts.
This happens with SjLj exceptions, because that's the model that modifies the IR
based on there being invokes, etc. in the function.
Remove any invokes of `llvm.donothing' during SjLj EH preparation. This will
give us a CFG that the back-end won't be confused about. If all of the invokes
in a function are removed, then the SjLj EH prepare pass won't insert the bogus
code the relies upon the invokes being there.
<rdar://problem/
13228754&
13316637>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176677
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 8 Mar 2013 01:26:10 +0000 (01:26 +0000)]
remove an ancient and quaint bit of commented out makefile goo from when
GCC was the system compiler on the mac.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176675
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 8 Mar 2013 00:23:31 +0000 (00:23 +0000)]
Upgrade tests to the latest debug info format.
Mostly this is just changing the named metadata (llvm.dbg.sp, llvm.dbg.gv,
llvm.dbg.<func>.lv, etc -> llvm.dbg.cu), adding a few fields to older records
(DIVariable: flags/inlined-at, DICompileUnit: sp/gv/types,
DISubprogram: local variables list)
The tests to update were discovered by a change I'm working on to remove debug
info version support - so any tests using old debug info versions I haven't
updated probably are bad tests or just not actually designed to test debug
info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176671
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 7 Mar 2013 23:55:51 +0000 (23:55 +0000)]
Add a getPassName() method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176669
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 7 Mar 2013 23:55:49 +0000 (23:55 +0000)]
Rename isEarlierInSameTrace to isUsefulDominator.
In very rare cases caused by irreducible control flow, the dominating
block can have the same trace head without actually being part of the
trace.
As long as such a dominator still has valid instruction depths, it is OK
to use it for computing instruction depths.
Rename the function to avoid lying, and add a check that instruction
depths are computed for the dominator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176668
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Thu, 7 Mar 2013 22:20:06 +0000 (22:20 +0000)]
Keep coding stanard.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176661
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Thu, 7 Mar 2013 22:10:33 +0000 (22:10 +0000)]
Don't create IRBuilder if we can return from the method earlier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176660
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 7 Mar 2013 21:38:33 +0000 (21:38 +0000)]
[fast-isel] Seriously, add support for the expect intrinsic.
rdar://
13370942
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176659
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 7 Mar 2013 20:56:18 +0000 (20:56 +0000)]
Fix tautological compare. Not sure why this didn't trigger any test failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176652
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 7 Mar 2013 20:53:34 +0000 (20:53 +0000)]
Replace temporary vectors with arrays.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176651
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 7 Mar 2013 20:42:17 +0000 (20:42 +0000)]
[fast-isel] Add support for the expect intrinsic.
rdar://
13370942
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176649
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 7 Mar 2013 20:33:29 +0000 (20:33 +0000)]
ArrayRefize some code. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176648
91177308-0d34-0410-b5e6-
96231b3b80d8
Jyotsna Verma [Thu, 7 Mar 2013 20:28:34 +0000 (20:28 +0000)]
Hexagon: Handle i8, i16 and i1 Var Args.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176647
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Thu, 7 Mar 2013 20:22:39 +0000 (20:22 +0000)]
Simplify code. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176646
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Thu, 7 Mar 2013 20:21:27 +0000 (20:21 +0000)]
Change Index type from unsigned long to unsigned. This should fix PR14980.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176645
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Thu, 7 Mar 2013 20:04:17 +0000 (20:04 +0000)]
Remove trailing spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176643
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Thu, 7 Mar 2013 20:01:47 +0000 (20:01 +0000)]
Change NULL to 0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176642
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Thu, 7 Mar 2013 20:01:19 +0000 (20:01 +0000)]
ArrayRef ca accept one element. Simplify code a little bit, also it matches now
coding in the other places of the file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176641
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Thu, 7 Mar 2013 19:21:08 +0000 (19:21 +0000)]
pre-RA-sched debug-only fix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176638
91177308-0d34-0410-b5e6-
96231b3b80d8
Jyotsna Verma [Thu, 7 Mar 2013 19:10:28 +0000 (19:10 +0000)]
Hexagon: Add support to lower block address.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176637
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Thu, 7 Mar 2013 19:07:57 +0000 (19:07 +0000)]
pre-RA-sched assertion fix. This bug was exposed by r176037.
rdar:
13370002 [pre-RA-sched] assertion: released too many times
I tracked this down to an earlier hack that is no longer applicable
and interfered with normal scheduler logic. With the changes in
r176037, it was causing an instruction to be scheduled multiple times.
I have an external test case that I tried hard to reduce and
failed. I can't even reproduce with llc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176636
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 7 Mar 2013 18:51:02 +0000 (18:51 +0000)]
Move testcase, this is testing extraction not inserting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176635
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 7 Mar 2013 18:48:40 +0000 (18:48 +0000)]
X86: Fold EXTRACT_SUBVECTORs of a BUILD_VECTOR into a smaller BUILD_VECTOR.
That can usually be lowered efficiently and is common in sandybridge code.
It would be nice to do this in DAGCombiner but we can't insert arbitrary
BUILD_VECTORs this late.
Fixes PR15462.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176634
91177308-0d34-0410-b5e6-
96231b3b80d8
Pekka Jaaskelainen [Thu, 7 Mar 2013 16:46:43 +0000 (16:46 +0000)]
Fixed a crash when cloning a function into a function with
different size argument list and without attributes in the
arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176632
91177308-0d34-0410-b5e6-
96231b3b80d8
Christian Konig [Thu, 7 Mar 2013 09:04:14 +0000 (09:04 +0000)]
R600/SI: rework input interpolation v2
v2: update CMakeLists.txt as well
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176626
91177308-0d34-0410-b5e6-
96231b3b80d8
Christian Konig [Thu, 7 Mar 2013 09:04:04 +0000 (09:04 +0000)]
R600/SI: remove SI_vs_load_buffer_index
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176625
91177308-0d34-0410-b5e6-
96231b3b80d8
Christian Konig [Thu, 7 Mar 2013 09:03:59 +0000 (09:03 +0000)]
R600/SI: remove SGPR address space v2
v2: fix R600 regressions
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176624
91177308-0d34-0410-b5e6-
96231b3b80d8
Christian Konig [Thu, 7 Mar 2013 09:03:52 +0000 (09:03 +0000)]
R600/SI: add proper formal parameter handling for SI
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176623
91177308-0d34-0410-b5e6-
96231b3b80d8
Christian Konig [Thu, 7 Mar 2013 09:03:46 +0000 (09:03 +0000)]
R600/SI: remove shader type intrinsic
Just encode the type as target specific attribute.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176622
91177308-0d34-0410-b5e6-
96231b3b80d8
Christian Konig [Thu, 7 Mar 2013 09:03:38 +0000 (09:03 +0000)]
R600/SI: switch types of SGPRs to v*i8
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176621
91177308-0d34-0410-b5e6-
96231b3b80d8
Christian Konig [Thu, 7 Mar 2013 09:03:30 +0000 (09:03 +0000)]
R600/SI: fix unused variable warning
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176620
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 7 Mar 2013 08:28:49 +0000 (08:28 +0000)]
Switch from a version 4.2/4.4 switch to a four-byte version string to be put
into the actual gcov file.
Instead of using the bottom 4 bytes as the function identifier, use a counter.
This makes the identifier numbers stable across multiple runs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176616
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Thu, 7 Mar 2013 06:34:49 +0000 (06:34 +0000)]
No need to go through int64 and APInt when generating a new constant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176615
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Thu, 7 Mar 2013 05:47:54 +0000 (05:47 +0000)]
SDAG: Handle scalarizing an extend of a <1 x iN> vector.
Just scalarize the element and rebuild a vector of the result type
from that.
rdar://
13281568
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176614
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 7 Mar 2013 02:03:08 +0000 (02:03 +0000)]
Remove GCDAProfiling.c. This copy is old, the copy in compiler-rt is newer and
is the one that should be used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176608
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Thu, 7 Mar 2013 01:42:00 +0000 (01:42 +0000)]
Debug Info: store the files and directories for each compile unit.
We now emit a line table for each compile unit. To reduce the prologue size
of each line table, the files and directories used by each compile unit are
stored in std::map<unsigned, std::vector< > > instead of std::vector< >.
The prologue for a lto'ed image can be as big as 93K. Duplicating 93K for each
compile unit causes a huge increase of debug info. With this patch, each
prologue will only emit the files required by the compile unit.
rdar://problem/
13342023
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176605
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Thu, 7 Mar 2013 01:38:04 +0000 (01:38 +0000)]
ArrayRef has a OneElt constructor. Beautify the code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176604
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Thu, 7 Mar 2013 01:30:40 +0000 (01:30 +0000)]
Switch from std::vector to ArrayRef. Speedup FoldBitCast by 5x.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176602
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Thu, 7 Mar 2013 01:03:35 +0000 (01:03 +0000)]
SimplifyCFG fix for volatile load/store.
Fixes rdar:
13349374.
Volatile loads and stores need to be preserved even if the language
standard says they are undefined. "volatile" in this context means "get
out of the way compiler, let my platform handle it".
Additionally, this is the only way I know of with llvm to write to the
first page (when hardware allows) without dropping to assembly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176599
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Thu, 7 Mar 2013 01:01:29 +0000 (01:01 +0000)]
Fix two remaining issue after fixing PR15355 when CMOV is not available
- Phi nodes should be replaced/updated after lowering CMOV into branch
because 'mainMBB' updating operand in Phi node is changed.
- Add EFLAGS in livein before lowering the 2nd CMOV. It's necessary as
we will reuse the EFLAGS generated before the 1st lowered CMOV, which
won't clobber EFLAGS. However, we need explicitly specify that.
- '-attr=-cmov' test case are added.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176598
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Wed, 6 Mar 2013 21:32:03 +0000 (21:32 +0000)]
[mips] Custom-legalize BR_JT.
In N64-static, GOT address is needed to compute the branch address.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176580
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Wed, 6 Mar 2013 19:04:56 +0000 (19:04 +0000)]
Generalize my previous fix for -print-options.
Always print options that differ from their implicit default. At least
for simple option types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176572
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Wed, 6 Mar 2013 18:24:34 +0000 (18:24 +0000)]
Remove tailing whitespaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176570
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Wed, 6 Mar 2013 18:22:22 +0000 (18:22 +0000)]
Give -loop-vectorize an explicit default.
This way, clang -mllvm -print-options shows that the driver is overriding it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176569
91177308-0d34-0410-b5e6-
96231b3b80d8
Shuxin Yang [Wed, 6 Mar 2013 17:48:48 +0000 (17:48 +0000)]
Memory Dependence Analysis (not mem-dep test) take advantage of "invariant.load" metadata.
The "invariant.load" metadata indicates the memory unit being accessed is immutable.
A load annotated with this metadata can be moved across any store.
As I am not sure if it is legal to move such loads across barrier/fence, this
change dose not allow such transformation.
rdar://
11311484
Thank Arnold for code review.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176562
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 6 Mar 2013 05:44:53 +0000 (05:44 +0000)]
InstCombine: Don't shrink allocas when combining with a bitcast.
When considering folding a bitcast of an alloca into the alloca itself,
make sure we don't shrink the amount of memory being allocated, or
things rapidly go sideways.
rdar://
13324424
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176547
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Wed, 6 Mar 2013 01:58:03 +0000 (01:58 +0000)]
[mips] Add a line which checks function name. Rename file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176543
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Wed, 6 Mar 2013 00:17:04 +0000 (00:17 +0000)]
Fix PR15355
- Clear 'mayStore' flag when loading from the atomic variable before the
spin loop
- Clear kill flag from one use to multiple use in registers forming the
address to that atomic variable
- don't use a physical register as live-in register in BB (neither entry
nor landing pad.) by copying it into virtual register
(patch by Cameron Zwarich)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176538
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Wed, 6 Mar 2013 00:16:16 +0000 (00:16 +0000)]
Use dyn_cast instead of isa && cast. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176537
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Wed, 6 Mar 2013 00:04:32 +0000 (00:04 +0000)]
Remove duplicated forward declaration.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176536
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 5 Mar 2013 23:22:30 +0000 (23:22 +0000)]
[mips] Remove android calling convention.
This calling convention was added just to handle functions which return vector
of floats. The fix committed in r165585 solves the problem.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176530
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 5 Mar 2013 22:54:59 +0000 (22:54 +0000)]
[mips] Fix MipsCC::analyzeReturn so that, in soft-float mode, fp128 gets
returned in registers $2 and $4.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176527
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 5 Mar 2013 22:41:55 +0000 (22:41 +0000)]
[mips] Fix MipsTargetLowering::LowerCallResult and LowerReturn to correctly
handle fp128 returns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176523
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 5 Mar 2013 22:20:28 +0000 (22:20 +0000)]
[mips] Fix MipsTargetLowering::LowerCall to pass fp128 arguments in floating
point registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176521
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 5 Mar 2013 22:13:04 +0000 (22:13 +0000)]
[mips] Correct handling of fp128 (long double) formals and read long double
parameters from floating point registers if target is mips64 hard float.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176520
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Tue, 5 Mar 2013 22:05:16 +0000 (22:05 +0000)]
Fix a few typos in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176519
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Tue, 5 Mar 2013 22:01:15 +0000 (22:01 +0000)]
Add some constantness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176518
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Tue, 5 Mar 2013 21:53:57 +0000 (21:53 +0000)]
std::distance() == 0 means that iterators are equal. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176516
91177308-0d34-0410-b5e6-
96231b3b80d8
Meador Inge [Tue, 5 Mar 2013 21:47:40 +0000 (21:47 +0000)]
Add more functions to the TLI.
This patch adds many more functions to the target library information.
All of the functions being added were discovered while doing the migration
of the simplify-libcalls attribute annotation functionality to the
functionattrs pass. As a part of that work the attribute annotation logic
will query TLI to determine if a function should be annotated or not.
Signed-off-by: Meador Inge <meadori@codesourcery.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176514
91177308-0d34-0410-b5e6-
96231b3b80d8