Matt Arsenault [Mon, 18 Nov 2013 02:51:33 +0000 (02:51 +0000)]
Fix spacing, forward declare order.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194985
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Sun, 17 Nov 2013 21:59:31 +0000 (21:59 +0000)]
Remove unnecessary temporary construction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194981
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Sun, 17 Nov 2013 21:57:33 +0000 (21:57 +0000)]
Remove redundant explicit default initialization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194980
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Sun, 17 Nov 2013 21:55:13 +0000 (21:55 +0000)]
DwarfCompileUnit: Add type safety to createGlobalVariableDIE
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194979
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Sun, 17 Nov 2013 21:24:41 +0000 (21:24 +0000)]
TableGen: Generate an enum for all named Operand types in tblgen'd InstrInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194978
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Sun, 17 Nov 2013 21:24:37 +0000 (21:24 +0000)]
Docs: Clearly separate Operand-related paragraphs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194977
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Sun, 17 Nov 2013 21:24:34 +0000 (21:24 +0000)]
Docs: Fix typo: NoIntinerary -> NoItinerary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194976
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Sun, 17 Nov 2013 19:35:03 +0000 (19:35 +0000)]
Debug Info: fix typo in function name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194975
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Sun, 17 Nov 2013 18:48:57 +0000 (18:48 +0000)]
Debug Info Verifier: fix when to find debug info nodes and when to verify them.
We used to collect debug info MDNodes in doInitialization and verify them in
doFinalization. That is incorrect since MDNodes can be modified by passes run
between doInitialization and doFinalization.
To fix the problem, we handle debug info MDNodes that can be reached from a
function in runOnFunction (i.e we collect those nodes by calling processDeclare,
processValue and processLocation, and then verify them in runOnFunction).
We handle debug info MDNodes that can be reached from named metadata in
doFinalization. This is in line with how Verifier handles module-level data
(they are verified in doFinalization).
rdar://
15472296
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194974
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Sun, 17 Nov 2013 18:42:37 +0000 (18:42 +0000)]
Debug Info Verifier: enable public functions of Finder to update the type map.
We used to depend on running processModule before the other public functions
such as processDeclare, processValue and processLocation. We are now relaxing
the constraint by adding a module argument to the three functions and
letting the three functions to initialize the type map. This will be used in
a follow-on patch that collects nodes reachable from a Function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194973
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sun, 17 Nov 2013 18:05:34 +0000 (18:05 +0000)]
Utils/LoopUnroll.cpp: Tweak (StringRef)OldName to be valid until it is used, since r194601.
eraseFromParent() invalidates OldName.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194970
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Sun, 17 Nov 2013 16:02:50 +0000 (16:02 +0000)]
Add a loop rerolling flag to the PassManagerBuilder
This adds a boolean member variable to the PassManagerBuilder to control loop
rerolling (just like we have for unrolling and the various vectorization
options). This is necessary for control by the frontend. Loop rerolling remains
disabled by default at all optimization levels.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194966
91177308-0d34-0410-b5e6-
96231b3b80d8
Anders Waldenborg [Sun, 17 Nov 2013 15:40:57 +0000 (15:40 +0000)]
python: Fix check for disasm creation failure
Check should be for pointer being NULL, not what it points to.
Also adds a test for this case.
Reviewed By: indygreg
Differential Revision: http://llvm-reviews.chandlerc.com/D1878
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194965
91177308-0d34-0410-b5e6-
96231b3b80d8
Anders Waldenborg [Sun, 17 Nov 2013 15:17:08 +0000 (15:17 +0000)]
python: Properly initialize before trying to create disasm
As the "LLVMInitializeAll*" functions are not available as symbols in
the shared library they can't be used, and as a workaround a list of
the targets is kept and the individual symbols tried. As soon as the
"All"-functions are changed to proper symbols (as opposed to static
inlines in the headers) this hack will be replace with simple calls
to the corresponding "LLVMInitializeAll*" functions.
Reviewed By: indygreg
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1879
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194964
91177308-0d34-0410-b5e6-
96231b3b80d8
Alp Toker [Sun, 17 Nov 2013 11:44:36 +0000 (11:44 +0000)]
Update CREDITS
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194962
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sun, 17 Nov 2013 10:53:19 +0000 (10:53 +0000)]
Testcase for PR17964
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194961
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sun, 17 Nov 2013 10:53:13 +0000 (10:53 +0000)]
Revert "Micro-optimization"
This reverts commit
f1d9fe9d04ce93f6d5dcebbd2cb6a07414d7a029.
This was causing PR17964. We need to use thread data before regular data.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194960
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 17 Nov 2013 10:40:03 +0000 (10:40 +0000)]
DAGCombiner: Partially revert r192795, getNOT was fixed not to create illegal constants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194959
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaron Keren [Sun, 17 Nov 2013 09:47:39 +0000 (09:47 +0000)]
DebugLoc defines LineCol as 32 bit in comment but unsigned in code.
This patch modifies LineCol to be a uint32_t.
See http://llvm.org/bugs/show_bug.cgi?id=17957
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194957
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Sun, 17 Nov 2013 03:25:24 +0000 (03:25 +0000)]
[block-freq] Add BlockFrequency::scale that returns a remainder from the division and make the private scale in BlockFrequency more performant.
This change is the first in a series of changes improving LLVM's Block
Frequency propogation implementation to not lose probability mass in
branchy code when propogating block frequency information from a basic
block to its successors. This patch is a simple infrastructure
improvement that does not actually modify the block frequency
algorithm. The specific changes are:
1. Changes the division algorithm used when scaling block frequencies by
branch probabilities to a short division algorithm. This gives us the
remainder for free as well as provides a nice speed boost. When I
benched the old routine and the new routine on a Sandy Bridge iMac with
disabled turbo mode performing 8192 iterations on an array of length
32768, I saw ~600% increase in speed in mean/median performance.
2. Exposes a scale method that returns a remainder. This is important so
we can ensure that when we scale a block frequency by some branch
probability BP = N/D, the remainder from the division by D can be
retrieved and propagated to other children to ensure no probability mass
is lost (more to come on this).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194950
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 17 Nov 2013 03:18:05 +0000 (03:18 +0000)]
[PM] Completely remove support for explicit 'require' methods on the
AnalysisManager. All this method did was assert something and we have
a perfectly good way to trigger that assert from the query path.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194947
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sun, 17 Nov 2013 02:31:26 +0000 (02:31 +0000)]
Use more getZExtOrTruncs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194945
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sun, 17 Nov 2013 02:24:21 +0000 (02:24 +0000)]
Use getZExtOrTrunc instead of repeating the same logic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194944
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Sun, 17 Nov 2013 02:06:35 +0000 (02:06 +0000)]
Add the cold attribute to error-reporting call sites
Generally speaking, control flow paths with error reporting calls are cold.
So far, error reporting calls are calls to perror and calls to fprintf,
fwrite, etc. with stderr as the stream. This can be extended in the future.
The primary motivation is to improve block placement (the cold attribute
affects the static branch prediction heuristics).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194943
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Sun, 17 Nov 2013 01:36:23 +0000 (01:36 +0000)]
Added a size field to the stack map record to handle subregister spills.
Implementing this on bigendian platforms could get strange. I added a
target hook, getStackSlotRange, per Jakob's recommendation to make
this as explicit as possible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194942
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Sun, 17 Nov 2013 01:21:54 +0000 (01:21 +0000)]
Fix ndebug-build unused variable in loop rerolling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194941
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sun, 17 Nov 2013 00:06:39 +0000 (00:06 +0000)]
Use right address space pointer size
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194940
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Sat, 16 Nov 2013 23:59:05 +0000 (23:59 +0000)]
Add a loop rerolling pass
This adds a loop rerolling pass: the opposite of (partial) loop unrolling. The
transformation aims to take loops like this:
for (int i = 0; i < 3200; i += 5) {
a[i] += alpha * b[i];
a[i + 1] += alpha * b[i + 1];
a[i + 2] += alpha * b[i + 2];
a[i + 3] += alpha * b[i + 3];
a[i + 4] += alpha * b[i + 4];
}
and turn them into this:
for (int i = 0; i < 3200; ++i) {
a[i] += alpha * b[i];
}
and loops like this:
for (int i = 0; i < 500; ++i) {
x[3*i] = foo(0);
x[3*i+1] = foo(0);
x[3*i+2] = foo(0);
}
and turn them into this:
for (int i = 0; i < 1500; ++i) {
x[i] = foo(0);
}
There are two motivations for this transformation:
1. Code-size reduction (especially relevant, obviously, when compiling for
code size).
2. Providing greater choice to the loop vectorizer (and generic unroller) to
choose the unrolling factor (and a better ability to vectorize). The loop
vectorizer can take vector lengths and register pressure into account when
choosing an unrolling factor, for example, and a pre-unrolled loop limits that
choice. This is especially problematic if the manual unrolling was optimized
for a machine different from the current target.
The current implementation is limited to single basic-block loops only. The
rerolling recognition should work regardless of how the loop iterations are
intermixed within the loop body (subject to dependency and side-effect
constraints), but the significant restriction is that the order of the
instructions in each iteration must be identical. This seems sufficient to
capture all current use cases.
This pass is not currently enabled by default at any optimization level.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194939
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Sat, 16 Nov 2013 22:08:58 +0000 (22:08 +0000)]
The WebKit_JS CC preserves the same registers as the C CC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194936
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Sat, 16 Nov 2013 21:29:08 +0000 (21:29 +0000)]
Apply the InstCombine fptrunc sqrt optimization to llvm.sqrt
InstCombine, in visitFPTrunc, applies the following optimization to sqrt calls:
(fptrunc (sqrt (fpext x))) -> (sqrtf x)
but does not apply the same optimization to llvm.sqrt. This is a problem
because, to enable vectorization, Clang generates llvm.sqrt instead of sqrt in
fast-math mode, and because this optimization is being applied to sqrt and not
applied to llvm.sqrt, sometimes the fast-math code is slower.
This change makes InstCombine apply this optimization to llvm.sqrt as well.
This fixes the specific problem in PR17758, although the same underlying issue
(optimizations applied to libcalls are not applied to intrinsics) exists for
other optimizations in SimplifyLibCalls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194935
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sat, 16 Nov 2013 20:50:54 +0000 (20:50 +0000)]
Fix assert on unaligned access to global with different address space size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194934
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sat, 16 Nov 2013 20:24:41 +0000 (20:24 +0000)]
Fix codegen for null different sized pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194932
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 16 Nov 2013 16:25:47 +0000 (16:25 +0000)]
ScalarEvolution: Warn if the result of setFlags/clearFlags is unused.
This was a source of bugs in the past.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194929
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 16 Nov 2013 16:25:41 +0000 (16:25 +0000)]
Annotate APInt methods where it's not clear whether they are in place with warn_unused_result.
Fix ScalarEvolution bugs uncovered by this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194928
91177308-0d34-0410-b5e6-
96231b3b80d8
Vincent Lejeune [Sat, 16 Nov 2013 16:24:41 +0000 (16:24 +0000)]
R600: Make dot_4 instructions predicable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194927
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Sat, 16 Nov 2013 16:15:56 +0000 (16:15 +0000)]
Use array_pod_sort instead of std::sort
Per Rafael's review of r194514.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194926
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 16 Nov 2013 16:00:48 +0000 (16:00 +0000)]
InstCombine: fold (A >> C) == (B >> C) --> (A^B) < (1 << C) for constant Cs.
This is common in bitfield code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194925
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Sat, 16 Nov 2013 15:40:54 +0000 (15:40 +0000)]
Fix filename in header comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194924
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sat, 16 Nov 2013 05:26:49 +0000 (05:26 +0000)]
gtest-death-test.cc: Move ~DeathTestFactory() to unbreak cygming build since r194865.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194918
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Sat, 16 Nov 2013 02:34:57 +0000 (02:34 +0000)]
Debug Info Verifier: remove un-used argument in verifyDebugInfo.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194917
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Sat, 16 Nov 2013 00:52:57 +0000 (00:52 +0000)]
X86: Encode the 'h' cpu subtype in the MachO header for x86.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194906
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sat, 16 Nov 2013 00:36:46 +0000 (00:36 +0000)]
Mention address space related changes in release notes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194904
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sat, 16 Nov 2013 00:36:43 +0000 (00:36 +0000)]
Use correct size for address space in BasicAA.
The tests just hit this with a different sized
address space since I haven't figured out how
to use this to break it.
I thought I committed this a long time ago,
and I'm not sure why missing this hasn't caused
any problems.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194903
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Sat, 16 Nov 2013 00:29:01 +0000 (00:29 +0000)]
DwarfCompileUnit: Push type safety of DIDescriptor through CompileUnit::createAndAddDIE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194902
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Sat, 16 Nov 2013 00:28:15 +0000 (00:28 +0000)]
DwarfCompileUnit: Remove unnecessary OwningPtr<T>::get() call
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194901
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Sat, 16 Nov 2013 00:20:01 +0000 (00:20 +0000)]
Small improvement to InstrinsicEmitter::EmitAttributes. This change removes the “pushing” and “clearing” of the SmallVector and instead uses const arrays to pass the attributeKinds to AttributeSet::get .
Patch by Aditya Nandakumar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194899
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Sat, 16 Nov 2013 00:18:40 +0000 (00:18 +0000)]
For dwarf4 use the correct form for referencing debug_loc locations,
and update test cases accordingly.
This doesn't affect the output dumped using llvm-dwarfdump, but
readelf does now dump the debug_loc section.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194898
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 15 Nov 2013 23:54:45 +0000 (23:54 +0000)]
DwarfCompileUnit: Add type safety to CompileUnit::getNode by returning DICompileUnit instead of a raw MDNode*.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194895
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 15 Nov 2013 23:52:02 +0000 (23:52 +0000)]
DwarfCompileUnit: Add type safety by using DICompileUnit rather than raw MDNode* for the CU metadata node
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194893
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 15 Nov 2013 23:50:53 +0000 (23:50 +0000)]
DwarfCompileUnit: Simplify getLanguage() calls to use existing member function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194892
91177308-0d34-0410-b5e6-
96231b3b80d8
Ana Pazos [Fri, 15 Nov 2013 23:32:10 +0000 (23:32 +0000)]
Implemented aarch64 Neon scalar vmulx_lane intrinsics
Implemented aarch64 Neon scalar vfma_lane intrinsics
Implemented aarch64 Neon scalar vfms_lane intrinsics
Implemented legacy vmul_n_f64, vmul_lane_f64, vmul_laneq_f64
intrinsics (v1f64 parameter type) using Neon scalar instructions.
Implemented legacy vfma_lane_f64, vfms_lane_f64,
vfma_laneq_f64, vfms_laneq_f64 intrinsics (v1f64 parameter type)
using Neon scalar instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194888
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Fri, 15 Nov 2013 23:21:39 +0000 (23:21 +0000)]
Replace the dangling context hotfix with an assertion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194883
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Fri, 15 Nov 2013 23:19:01 +0000 (23:19 +0000)]
Remove unused arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194882
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Fri, 15 Nov 2013 23:13:21 +0000 (23:13 +0000)]
During folding for patchpoint/stackmap instructions, defer creation of new MIs
until we know that folding will be successful.
No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194880
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 15 Nov 2013 23:13:08 +0000 (23:13 +0000)]
DwarfDebug: Push DISubprogram through updateSubprogramScopeDIE
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194879
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Fri, 15 Nov 2013 23:09:33 +0000 (23:09 +0000)]
LoopVectorizer: Use abi alignment for accesses with no alignment
When we vectorize a scalar access with no alignment specified, we have to set
the target's abi alignment of the scalar access on the vectorized access.
Using the same alignment of zero would be wrong because most targets will have a
bigger abi alignment for vector types.
This probably fixes PR17878.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194876
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 15 Nov 2013 23:09:13 +0000 (23:09 +0000)]
DwarfCompileUnit: Push DIDescriptors through a getDIE/insertDIE
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194875
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Fri, 15 Nov 2013 23:02:56 +0000 (23:02 +0000)]
Fix previous commit (r194865)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194874
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 15 Nov 2013 22:59:36 +0000 (22:59 +0000)]
DwarfCompileUnit: Push DIDescriptor usage out from isShareableAcrossCUs
This is the first of a few similar patches. We'll see how far it
goes/makes sense.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194871
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 15 Nov 2013 22:43:50 +0000 (22:43 +0000)]
Fix typos.
I somehow didn't notice before that the examples
for addrspacecast use the wrong syntax for addrspace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194868
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Fri, 15 Nov 2013 22:34:48 +0000 (22:34 +0000)]
[weak vtables] Remove a bunch of weak vtables
This patch removes most of the trivial cases of weak vtables by pinning them to
a single object file.
Differential Revision: http://llvm-reviews.chandlerc.com/D2068
Reviewed by Andy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194865
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 15 Nov 2013 22:18:19 +0000 (22:18 +0000)]
Fix confusing machine verifier error.
The error reported the number of explicit operands,
but that isn't what is checked. In my case, this
resulted in the confusing errors
"Too few operands." followed shortly by
"8 operands expected, but 8 given."
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194862
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Kaylor [Fri, 15 Nov 2013 22:10:21 +0000 (22:10 +0000)]
Fix a problem in MCJIT identifying the module containing a global variable.
Patch by Keno Fischer!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194859
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 15 Nov 2013 22:02:28 +0000 (22:02 +0000)]
Make method static
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194858
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 15 Nov 2013 21:56:44 +0000 (21:56 +0000)]
[PM] Fix an iterator problem spotted by the MSVC debug iterators and
AaronBallman. Thanks for the excellent review.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194857
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 15 Nov 2013 21:44:35 +0000 (21:44 +0000)]
[PM] Run clang-format on a few lines that I missed in my first pass,
pulling them under 80-columns. No functionality changed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194856
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 15 Nov 2013 21:28:10 +0000 (21:28 +0000)]
[AArch64] Fix the scalar NEON ACLE functions so that they return float/double
rather than the vector equivalent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194853
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Fri, 15 Nov 2013 21:22:02 +0000 (21:22 +0000)]
Path: Recognize COFF import library file magic.
Summary: Make identify_magic to recognize COFF import file.
Reviewers: Bigcheese
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D2165
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194852
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Fri, 15 Nov 2013 21:05:09 +0000 (21:05 +0000)]
Reimplement r194843 in a slightly less broken way.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194848
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Fri, 15 Nov 2013 20:41:15 +0000 (20:41 +0000)]
ArgumentPromotion: correctly transfer TBAA tags and alignments.
We used to use std::map<IndicesVector, LoadInst*> for OriginalLoads, and when we
try to promote two arguments, they will both write to OriginalLoads causing
created loads for the two arguments to have the same original load. And the same
tbaa tag and alignment will be put to the created loads for the two arguments.
The fix is to use std::map<std::pair<Argument*, IndicesVector>, LoadInst*>
for OriginalLoads, so each Argument will write to different parts of the map.
PR17906
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194846
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Fri, 15 Nov 2013 20:23:25 +0000 (20:23 +0000)]
Readobj: If NumbersOfSections is 0xffff, it's an COFF import library.
0xffff does not mean that there are 65535 sections in a COFF file but
indicates that it's a COFF import library. This patch fixes SEGV error
when an import library file is passed to llvm-readobj.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194844
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Fri, 15 Nov 2013 19:53:23 +0000 (19:53 +0000)]
Restore the behaviour from before r194728.
If getDIE() fails, getOrCreateContextDIE() should also return the CUDie.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194843
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Fri, 15 Nov 2013 19:09:27 +0000 (19:09 +0000)]
Avoid illegal integer promotion in fastisel
Stop folding constant adds into GEP when the type size doesn't match.
Otherwise, the adds' operands are effectively being promoted, changing the
conditions of an overflow. Results are different when:
sext(a) + sext(b) != sext(a + b)
Problem originally found on x86-64, but also fixed issues with ARM and PPC,
which used similar code.
<rdar://problem/
15292280>
Patch by Duncan Exon Smith!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194840
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 15 Nov 2013 18:26:45 +0000 (18:26 +0000)]
R600/SI: Add VReg_96 register class to SIRegisterInfo::hasVGPRs()
This fixes a crash with GNOME settings manager.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194836
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Kaylor [Fri, 15 Nov 2013 17:59:43 +0000 (17:59 +0000)]
Resolve JIT runtime linking problems on Android.
Patch by James Lyon!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194832
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Kaylor [Fri, 15 Nov 2013 17:52:54 +0000 (17:52 +0000)]
Don't try to initialize memory for a global if the allocation failed in ExecutionEngine.
Patch by Dale Martin!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194831
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 15 Nov 2013 17:35:29 +0000 (17:35 +0000)]
Update contact information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194828
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Fri, 15 Nov 2013 17:24:41 +0000 (17:24 +0000)]
[mips][msa] Merge basic_operations_little.ll into basic_operations.ll.
Now that FileCheck supports multiple check prefixes, we don't need to keep the
little and big endian versions of this test separate anymore. Merge them back
together.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194826
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron McInally [Fri, 15 Nov 2013 17:01:14 +0000 (17:01 +0000)]
Add AVX512 unmasked FMA intrinsics and support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194824
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Holewinski [Fri, 15 Nov 2013 16:08:49 +0000 (16:08 +0000)]
[NVPTX] Fix type in usage doc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194821
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Fri, 15 Nov 2013 16:02:04 +0000 (16:02 +0000)]
[mips][msa] lowerMSABitClear() should use SelectionDAG::getNOT() instead of using a long-winded equivalent.
Now that getConstant(-1, MVT::v2i64) works correctly on MIPS32 we can use
SelectionDAG::getNOT() to produce the bitmask.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194819
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Fri, 15 Nov 2013 15:49:30 +0000 (15:49 +0000)]
Hopefully fix uninitialized memory read in AArch64AsmParser found by MSan bootstrap bot
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194818
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Holewinski [Fri, 15 Nov 2013 13:02:10 +0000 (13:02 +0000)]
[NVPTX] Update the usage document
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194812
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Fri, 15 Nov 2013 12:56:49 +0000 (12:56 +0000)]
Fix illegal DAG produced by SelectionDAG::getConstant() for v2i64 type
Summary:
When getConstant() is called for an expanded vector type, it is split into
multiple scalar constants which are then combined using appropriate build_vector
and bitcast operations.
In addition to the usual big/little endian differences, the case where the
element-order of the vector does not have the same endianness as the elements
themselves is also accounted for. For example, for v4i32 on big-endian MIPS,
the byte-order of the vector is <3210,7654,BA98,FEDC>. For little-endian, it is
<0123,4567,89AB,CDEF>.
Handling this case turns out to be a nop since getConstant() returns a splatted
vector (so reversing the element order doesn't change the value)
This fixes a number of cases in MIPS MSA where calling getConstant() during
operation legalization introduces illegal types (e.g. to legalize v2i64 UNDEF
into a v2i64 BUILD_VECTOR of illegal i64 zeros). It should also handle bigger
differences between illegal and legal types such as legalizing v2i64 into v8i16.
lowerMSASplatImm() in the MIPS backend no longer needs to avoid calling
getConstant() so this function has been updated in the same patch.
For the sake of transparency, the steps I've taken since the review are:
* Added 'virtual' to isVectorEltOrderLittleEndian() as requested. This revealed
that the MIPS tests were falsely passing because a polymorphic function was
not actually polymorphic in the reviewed patch.
* Fixed the tests that were now failing. This involved deleting the code to
handle the MIPS MSA element-order (which was previously doing an byte-order
swap instead of an element-order swap). This left
isVectorEltOrderLittleEndian() unused and it was deleted.
* Fixed build failures caused by rebasing beyond r194467-r194472. These build
failures involved the bset, bneg, and bclr instructions added in these commits
using lowerMSASplatImm() in a way that was no longer valid after this patch.
Some of these were fixed by calling SelectionDAG::getConstant() instead,
others were fixed by a new function getBuildVectorSplat() that provided the
removed functionality of lowerMSASplatImm() in a more sensible way.
Reviewers: bkramer
Reviewed By: bkramer
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1973
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194811
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Holewinski [Fri, 15 Nov 2013 12:30:04 +0000 (12:30 +0000)]
[NVPTX] Fix handling of indirect calls
Using a special machine node is cleaner than an InlineAsm node, and fixes an assertion failure in InstrEmitter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194810
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaron Keren [Fri, 15 Nov 2013 11:42:49 +0000 (11:42 +0000)]
Correct spelling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194808
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Fri, 15 Nov 2013 11:04:16 +0000 (11:04 +0000)]
[mips][msa] Build all the tests in little and big endian modes and correct an incorrect test.
Summary:
This patch (correctly) breaks some MSA tests by exposing the cases when
SelectionDAG::getConstant() produces illegal types. These have been temporarily
marked XFAIL and the XFAIL flag will be removed when
SelectionDAG::getConstant() is fixed.
There are three categories of failure:
* Immediate instructions are not selected in one endian mode.
* Immediates used in ldi.[bhwd] must be different according to endianness.
(this only affects cases where the 'wrong' ldi is used to load the correct
bitpattern. E.g. (bitcast:v2i64 (build_vector:v4i32 ...)))
* Non-immediate instructions that rely on immediates affected by the
previous two categories as part of their match pattern.
For example, the bset match pattern is the vector equivalent of
'ws | (1 << wt)'.
One test needed correcting to expect different output depending on whether big
or little endian was in use. This test was
test/CodeGen/Mips/msa/basic_operations.ll and experiences the second category
of failure shown above. The little endian version of this test is named
basic_operations_little.ll and will be merged back into basic_operations.ll in
a follow up commit now that FileCheck supports multiple check prefixes.
Reviewers: bkramer, jacksprat, dsanders
Reviewed By: dsanders
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1972
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194806
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 15 Nov 2013 10:20:45 +0000 (10:20 +0000)]
Move all of the GoogleTest files back to the same locations they occupy
externally to simplify our integration of GoogleTest into LLVM. Also,
build the single source file gtest-all.cc instead of the individual
source files as we don't expect these to change and thus gain nothing
from increased incrementality in compiles.
This makes our standard build of googletest exactly like upstream's
recommended build and the sanitizer's build. It also simplifies the
steps of importing a new version should we ever want one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194801
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Fri, 15 Nov 2013 09:52:05 +0000 (09:52 +0000)]
[asan] use GlobalValue::PrivateLinkage for coverage guard to save quite a bit of code size
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194800
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 15 Nov 2013 09:44:17 +0000 (09:44 +0000)]
llvm-cov: Clean up memory leaks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194799
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Fri, 15 Nov 2013 09:36:58 +0000 (09:36 +0000)]
Redirect unused test case output to /dev/null
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194798
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 15 Nov 2013 09:34:33 +0000 (09:34 +0000)]
Give unit test its own LLVMContext so MDNodes aren't leaked even if we never call llvm_shutdown.
Found by valgrind.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194797
91177308-0d34-0410-b5e6-
96231b3b80d8
Renato Golin [Fri, 15 Nov 2013 08:42:14 +0000 (08:42 +0000)]
Adding some info about stability of ARM boards
Patch by Mikael Lyngvig
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194794
91177308-0d34-0410-b5e6-
96231b3b80d8
Zoran Jovanovic [Fri, 15 Nov 2013 08:07:34 +0000 (08:07 +0000)]
Use instr mapping for microMIPS in llvm-mc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194792
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Fri, 15 Nov 2013 07:16:09 +0000 (07:16 +0000)]
Reapply "[asan] Poor man's coverage that works with ASan"
I was able to successfully run a bootstrapped LTO build of clang with
r194701, so this change does not seem to be the cause of our failing
buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194789
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 15 Nov 2013 05:52:56 +0000 (05:52 +0000)]
Platform proof a test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194788
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 15 Nov 2013 05:45:08 +0000 (05:45 +0000)]
Add instcombine visitor for addrspacecast
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194786
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 15 Nov 2013 05:44:56 +0000 (05:44 +0000)]
Fix grammar in addrspacecast description
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194785
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 15 Nov 2013 04:42:23 +0000 (04:42 +0000)]
Add target hook to prevent folding some bitcasted loads.
This is to avoid this transformation in some cases:
fold (conv (load x)) -> (load (conv*)x)
On architectures that don't natively support some vector
loads efficiently casting the load to a smaller vector of
larger types and loading is more efficient.
Patch by Micah Villmow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194783
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Fri, 15 Nov 2013 03:43:51 +0000 (03:43 +0000)]
[OCaml] Add REQUIRES: native, object-emission to the Target test
While the test would work with any compiled in target with object
emission support, it's nontrivial to formulate this condition in
lit, so a conservative restriction is used instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194781
91177308-0d34-0410-b5e6-
96231b3b80d8