Daniel Dunbar [Fri, 19 Oct 2012 20:29:30 +0000 (20:29 +0000)]
lit: Rename the valgrind leaks feature to match what is currently used
(vg_leak).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166306
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 19 Oct 2012 20:29:27 +0000 (20:29 +0000)]
lit: Remove support for XTARGET.
- The XTARGET feature (inherited from old DG tests) was just confusing (and
barely ever used). The same effect can now be achieved with a combination of
the more useful REQUIRES and XFAIL.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166305
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 19 Oct 2012 20:12:00 +0000 (20:12 +0000)]
lit: Add 'valgrind' and 'valgrind-leaks' features when valgrind is used.
- These can be used with the XFAIL options.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166303
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 19 Oct 2012 20:11:56 +0000 (20:11 +0000)]
tests: Stop mangling '-vg' into the triple, we don't use this currently.
- Also, lit is going to get a valgrind feature, instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166302
91177308-0d34-0410-b5e6-
96231b3b80d8
Shuxin Yang [Fri, 19 Oct 2012 20:11:16 +0000 (20:11 +0000)]
This patch is to fix radar://
8426430. It is about llvm support of __builtin_debugtrap()
which is supposed to consistently raise SIGTRAP across all systems. In contrast,
__builtin_trap() behave differently on different systems. e.g. it raises SIGTRAP on ARM, and
SIGILL on X86. The purpose of __builtin_debugtrap() is to consistently provide "trap"
functionality, in the mean time preserve the compatibility with on gcc on __builtin_trap().
The X86 backend is already able to handle debugtrap(). This patch is to:
1) make front-end recognize "__builtin_debugtrap()" (emboddied in the one-line change to Clang).
2) In DAG legalization phase, by default, "debugtrap" will be replaced with "trap", which
make the __builtin_debugtrap() "available" to all existing ports without the hassle of
changing their code.
3) If trap-function is specified (via -trap-func=xyz to llc), both __builtin_debugtrap() and
__builtin_trap() will be expanded into the function call of the specified trap function.
This behavior may need change in the future.
The provided testing-case is to make sure 2) and 3) are working for ARM port, and we
already have a testing case for x86.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166300
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 19 Oct 2012 17:57:49 +0000 (17:57 +0000)]
[ms-inline asm] Add the isParsingInlineAsm() function to the MCAsmTargetParser.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166292
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 19 Oct 2012 17:53:54 +0000 (17:53 +0000)]
Indvars: Don't recursively delete instruction during BB iteration.
This can invalidate the iterators leading to use after frees and crashes.
Fixes PR12536.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166291
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 19 Oct 2012 17:23:39 +0000 (17:23 +0000)]
Fix some doc-os.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166290
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 19 Oct 2012 17:23:34 +0000 (17:23 +0000)]
lit: Propagate TERM variable in environment, some tools can do really obscure
odd things if this is missing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166289
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Fri, 19 Oct 2012 17:15:18 +0000 (17:15 +0000)]
Lower BUILD_VECTOR to SHUFFLE + INSERT_VECTOR_ELT for X86
- If INSERT_VECTOR_ELT is supported (above SSE2, either by custom
sequence of legal insn), transform BUILD_VECTOR into SHUFFLE +
INSERT_VECTOR_ELT if most of elements could be built from SHUFFLE with few
(so far 1) elements being inserted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166288
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 19 Oct 2012 16:37:30 +0000 (16:37 +0000)]
SCEVExpander: Don't crash when trying to merge two constant phis.
Just constant fold them so they can't cause any trouble. Fixes PR12627.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166286
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Fri, 19 Oct 2012 15:24:46 +0000 (15:24 +0000)]
[ASan] Support comments in ASan/TSan blacklist file as lines starting with #
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166283
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Fri, 19 Oct 2012 10:48:31 +0000 (10:48 +0000)]
Move SplitBlockAndInsertIfThen to BasicBlockUtils.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166278
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 19 Oct 2012 08:42:02 +0000 (08:42 +0000)]
LoopVectorize: Keep the IRBuilder on the stack.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166274
91177308-0d34-0410-b5e6-
96231b3b80d8
Stepan Dyatkovskiy [Fri, 19 Oct 2012 08:23:06 +0000 (08:23 +0000)]
ARM:
Removed extra stack frame object for fixed byval arguments,
VarArgsStyleRegisters invocation was reworked due to some improper usage in
past. PR14099 also demonstrates it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166273
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Fri, 19 Oct 2012 07:00:09 +0000 (07:00 +0000)]
Pacify -Wnon-virtual-dtor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166270
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Fri, 19 Oct 2012 06:20:53 +0000 (06:20 +0000)]
[asan] make sure asan erases old unused allocas after it created a new one. This became important after the recent move from ModulePass to FunctionPass because no cleanup is happening after asan pass any more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166267
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Fri, 19 Oct 2012 04:27:49 +0000 (04:27 +0000)]
recommit the patch that makes LSR and LowerInvoke use the TargetTransform interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166264
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Fri, 19 Oct 2012 03:17:00 +0000 (03:17 +0000)]
Simplify condition checking as CONCAT assume all inputs of the same type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166260
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Fri, 19 Oct 2012 01:24:18 +0000 (01:24 +0000)]
vectorizer: Add support for reading and writing from the same memory location.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166255
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Thu, 18 Oct 2012 23:22:48 +0000 (23:22 +0000)]
Reapply the TargerTransformInfo changes, minus the changes to LSR and Lowerinvoke.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166248
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Thu, 18 Oct 2012 23:21:01 +0000 (23:21 +0000)]
cleanup the comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166247
91177308-0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Thu, 18 Oct 2012 22:36:01 +0000 (22:36 +0000)]
Fix case for include of Compiler.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166243
91177308-0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Thu, 18 Oct 2012 22:22:58 +0000 (22:22 +0000)]
Add move constructors for OwningPtr and OwningArrayPtr.
While LLVM itself is still C++03, there's no reason why tools built on
top of it can't use C++11 features.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166242
91177308-0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Thu, 18 Oct 2012 22:22:55 +0000 (22:22 +0000)]
Add a T&& constructor to llvm::Optional.
This allows llvm::Optional to be used with movable-but-not-copyable types.
While LLVM itself is still C++03, there's no reason why tools built on
top of it can't use C++11 features.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166241
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Thu, 18 Oct 2012 22:03:31 +0000 (22:03 +0000)]
Mark bugpoint tests with XFAIL when building with LTO. <rdar://problem/
12473675>
The LTO Internalize pass is hiding symbols needed by the bugpoint-passes
plug-in. We need to add a flag to control whether Internalize should be run.
This is a temporary workaround to make these tests pass in the meantime.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166239
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Thu, 18 Oct 2012 21:49:18 +0000 (21:49 +0000)]
Fix a bug where a 32-bit address with the high bit does not get symbolicated
because the value is incorrectly being signed extended when passed to
SymbolLookUp().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166234
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Thu, 18 Oct 2012 21:45:31 +0000 (21:45 +0000)]
fix a naming typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166232
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 18 Oct 2012 20:43:11 +0000 (20:43 +0000)]
test: Add a lit config variable to check if LTO is enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166225
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 18 Oct 2012 20:43:04 +0000 (20:43 +0000)]
lit: Allow XFAIL: lines to also refer to "features".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166224
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 18 Oct 2012 20:27:15 +0000 (20:27 +0000)]
[ms-inline asm] Add a size argument to the LookupInlineAsmIdentifier() callback,
which will be used by the asm matcher in the near future.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166222
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Thu, 18 Oct 2012 20:25:36 +0000 (20:25 +0000)]
Use an export list when building JIT unittests. <rdar://problem/
12473675>
When building with LTO, the internalize pass is hiding some global symbols
that are necessary for the JIT unittests. It seems like that may be a bug in
LTO to do that by default, but until that gets fixed, this change makes sure
that we export the necessary symbols for the tests to pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166220
91177308-0d34-0410-b5e6-
96231b3b80d8
Sebastian Pop [Thu, 18 Oct 2012 19:58:28 +0000 (19:58 +0000)]
Use pre-python 2.5 syntax in lit.cfg.
Author: Quentin Neill <qneill@codeaurora.org>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166217
91177308-0d34-0410-b5e6-
96231b3b80d8
Sebastian Pop [Thu, 18 Oct 2012 19:53:48 +0000 (19:53 +0000)]
Clear unknown mem ops when merging stack slots (pr14090)
When merging stack slots, if StackColoring::remapInstructions gets a
value back from GetUnderlyingObject that it does not know about or is
not itself a stack slot, clear the memory operand in case it aliases
the merged slot. This prevents the introduction of incorrect aliasing
information.
Author: Matthew Curtis <mcurtis@codeaurora.org>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166216
91177308-0d34-0410-b5e6-
96231b3b80d8
Sebastian Pop [Thu, 18 Oct 2012 19:53:45 +0000 (19:53 +0000)]
Change MachineFrameInfo::StackObject::Alloca from Value* to AllocaInst*
This more accurately reflects what is actually being stored in the
field.
No functionality change intended.
Author: Matthew Curtis <mcurtis@codeaurora.org>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166215
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 18 Oct 2012 19:39:30 +0000 (19:39 +0000)]
[ms-inline asm] Have the LookupInlineAsmIdentifier() callback function return a
*NamedDecl. In turn, build the expressions after we're finished parsing the
asm. This avoids a crasher if the lookup fails.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166212
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Thu, 18 Oct 2012 18:52:54 +0000 (18:52 +0000)]
Revert "We need this symbol after an LTO build."
This reverts commit 165776. The plug-in uses this symbol; it does not
define it. It needs to be exported from bugpoint itself, not from the plug-in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166207
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Thu, 18 Oct 2012 18:34:50 +0000 (18:34 +0000)]
Avoid reconstructing the pointer set when searching for duplicated read/write pointers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166205
91177308-0d34-0410-b5e6-
96231b3b80d8
Micah Villmow [Thu, 18 Oct 2012 18:18:17 +0000 (18:18 +0000)]
Update the LangRef documentation for the per pointer address space support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166201
91177308-0d34-0410-b5e6-
96231b3b80d8
Meador Inge [Thu, 18 Oct 2012 18:12:43 +0000 (18:12 +0000)]
Cosmetic change -- move two simplifiers to the right commented statement group.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166199
91177308-0d34-0410-b5e6-
96231b3b80d8
Meador Inge [Thu, 18 Oct 2012 18:12:40 +0000 (18:12 +0000)]
instcombine: Migrate strcpy optimizations
This patch migrates the strcpy optimizations from the simplify-libcalls pass
into the instcombine library call simplifier. Note also that StrCpyChkOpt
has been updated with a few simplifications that were being done in the
simplify-libcalls version of StrCpyOpt, but not in the migrated implementation
of StrCpyOpt. There is no reason to overload StrCpyOpt with fortified and
regular simplifications in the new model since there is already a dedicated
simplifier for __strcpy_chk.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166198
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Thu, 18 Oct 2012 18:12:05 +0000 (18:12 +0000)]
test commit: verifying access from new address
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166197
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Thu, 18 Oct 2012 18:06:48 +0000 (18:06 +0000)]
In SimplifySelectOps we pulled two loads through a select node despite the fact that one was dependent on the other.
rdar://
12513091
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166196
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Thu, 18 Oct 2012 17:31:49 +0000 (17:31 +0000)]
When looking for a vector representation of a scalar, do a single lookup. Also, cache the result of the broadcast instruction.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166191
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 18 Oct 2012 15:49:34 +0000 (15:49 +0000)]
[ms-inline asm] Move most of the AsmParsing logic in clang back into the MC
layer. Add the ParseMSInlineAsm() function, which is the new interface to
clang. Also expose the new MCAsmParserSemaCallback interface, which is used
by the back-end to do name lookup in Sema. Finally, remove the now defunct
APIs introduced in r165946.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166183
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Thu, 18 Oct 2012 13:16:11 +0000 (13:16 +0000)]
This patch fixes failures in the SingleSource/Regression/C/uint64_to_float
test case on PowerPC caused by rounding errors when converting from a 64-bit
integer to a single-precision floating point. The reason for this are
double-rounding effects, since on PowerPC we have to convert to an
intermediate double-precision value first, which gets rounded to the
final single-precision result.
The patch fixes the problem by preparing the 64-bit integer so that the
first conversion step to double-precision will always be exact, and the
final rounding step will result in the correctly-rounded single-precision
result. The generated code sequence is equivalent to what GCC would generate.
When -enable-unsafe-fp-math is in effect, that extra effort is omitted
and we accept possible rounding errors (just like GCC does as well).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166178
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 18 Oct 2012 09:56:08 +0000 (09:56 +0000)]
Refactor insert and extract of sub-integers into static helpers that
operate purely on values. Sink the alloca loading and storing logic into
the rewrite routines that are specific to alloca-integer-rewrite
driving. This is just a refactoring here, but the subsequent step will
be to reuse the insertion and extraction logic when rewriting integer
loads and stores that have been split and decomposed into narrower loads
and stores.
No functionality changed other than different names for instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166176
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 18 Oct 2012 09:56:06 +0000 (09:56 +0000)]
This FIXME was fixed some time ago. =]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166175
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 18 Oct 2012 08:05:46 +0000 (08:05 +0000)]
Introduce a BarrierNoop pass, a hack designed to allow *some* control
over the implicitly-formed-and-nesting CGSCC pass manager and function
pass managers, especially when using them on the opt commandline or
using extension points in the module builder. The '-barrier' opt flag
(or the pass itself) will create a no-op module pass in the pipeline,
resetting the pass manager stack, and allowing the creation of a new
pipeline of function passes or CGSCC passes to be created that is
independent from any previous pipelines.
For example, this can be used to test running two CGSCC passes in
independent CGSCC pass managers as opposed to in the same CGSCC pass
manager. It also allows us to introduce a further hack into the
PassManagerBuilder to separate the O0 pipeline extension passes from the
always-inliner's CGSCC pass manager, which they likely do not want to
participate in... At the very least none of the Sanitizer passes want
this behavior.
This fixes a bug with ASan at O0 currently, and I'll commit the ASan
test which covers this pass. I'm happy to add a test case that this pass
exists and works, but not sure how much time folks would like me to
spend adding test cases for the details of its behavior of partition
pass managers.... The whole thing is just vile, and mostly intended to
unblock ASan, so I'm hoping to rip this all out in a brave new pass
manager world.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166172
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Thu, 18 Oct 2012 06:09:21 +0000 (06:09 +0000)]
remove unused variable to fix a warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166170
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Thu, 18 Oct 2012 05:46:16 +0000 (05:46 +0000)]
Add a small example which shows a vectorizable loop with a non-pow-of-two count
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166169
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Thu, 18 Oct 2012 05:43:52 +0000 (05:43 +0000)]
Temporarily revert the TargetTransform changes.
The TargetTransform changes are breaking LTO bootstraps of clang. I am
working with Nadav to figure out the problem, but I am reverting it for now
to get our buildbots working.
This reverts svn commits: 165665 165669 165670 165786 165787 165997
and I have also reverted clang svn 165741
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166168
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Thu, 18 Oct 2012 05:33:02 +0000 (05:33 +0000)]
Remove the use of dominators and AA.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166167
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Thu, 18 Oct 2012 05:29:12 +0000 (05:29 +0000)]
Vectorizer: Add support for loops with an unknown count. For example:
for (i=0; i<n; i++){
a[i] = b[i+1] + c[i+3];
}
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166165
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 17 Oct 2012 23:56:05 +0000 (23:56 +0000)]
Revert r166157 because some tests fail...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166159
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 17 Oct 2012 23:54:19 +0000 (23:54 +0000)]
Check that the operand of the GEP is not the GEP itself. This occurred during an LTO build of LLVM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166157
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Wed, 17 Oct 2012 23:45:54 +0000 (23:45 +0000)]
Revert part of r166049 back and enable test case in r166125.
- Folding (trunc (concat ... X )) to (concat ... (trunc X) ...) is valid
when '...' are all 'undef's.
- r166125 relies on this transformation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166155
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 17 Oct 2012 23:40:15 +0000 (23:40 +0000)]
LoopVectorize.cpp: Fix a warning. [-Wunused-variable]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166153
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Wed, 17 Oct 2012 23:08:19 +0000 (23:08 +0000)]
Disable extract-concat test case temporarily
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166141
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Wed, 17 Oct 2012 23:06:37 +0000 (23:06 +0000)]
Remove redundant SetInsertPoint call.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166138
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Wed, 17 Oct 2012 22:41:15 +0000 (22:41 +0000)]
Revert r166049
- In general, it's unsafe for this transformation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166135
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Wed, 17 Oct 2012 22:29:54 +0000 (22:29 +0000)]
Add conditional branch instructions and their patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166134
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Divacky [Wed, 17 Oct 2012 21:07:35 +0000 (21:07 +0000)]
Fix some typos and wrong indenting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166128
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Wed, 17 Oct 2012 20:48:33 +0000 (20:48 +0000)]
Teach DAG combine to fold (extract_subvec (concat v1, ..) i) to v_i
- If the extracted vector has the same type of all vectored being concatenated
together, it should be simplified directly into v_i, where i is the index of
the element being extracted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166125
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 17 Oct 2012 20:26:33 +0000 (20:26 +0000)]
Switch MRI::UsedPhysRegs to a register unit bit vector.
This is a more compact, less redundant representation, and it avoids
scanning long lists of aliases for ARM D-registers, for example.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166124
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Wed, 17 Oct 2012 19:49:21 +0000 (19:49 +0000)]
Update the release notes about how to enable the loop vectorizer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166123
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 17 Oct 2012 19:39:36 +0000 (19:39 +0000)]
Add a really faster pre-RA scheduler (-pre-RA-sched=linearize). It doesn't use
any scheduling heuristics nor does it build up any scheduling data structure
that other heuristics use. It essentially linearize by doing a DFA walk but
it does handle glues correctly.
IMPORTANT: it probably can't handle all the physical register dependencies so
it's not suitable for x86. It also doesn't deal with dbg_value nodes right now
so it's definitely is still WIP.
rdar://
12474515
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166122
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 17 Oct 2012 18:44:18 +0000 (18:44 +0000)]
Merge MRI::isPhysRegOrOverlapUsed() into isPhysRegUsed().
All callers of these functions really want the isPhysRegOrOverlapUsed()
functionality which also checks aliases. For historical reasons, targets
without register aliases were calling isPhysRegUsed() instead.
Change isPhysRegUsed() to also check aliases, and switch all
isPhysRegOrOverlapUsed() callers to isPhysRegUsed().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166117
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Wed, 17 Oct 2012 18:35:21 +0000 (18:35 +0000)]
Update the release notes about the store-merge dag optimization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166116
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Wed, 17 Oct 2012 18:33:50 +0000 (18:33 +0000)]
Update the release notes about the new TargetTransformInfo API changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166115
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Wed, 17 Oct 2012 18:30:09 +0000 (18:30 +0000)]
Update the release notes about the new loop vectorizer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166113
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Wed, 17 Oct 2012 18:25:06 +0000 (18:25 +0000)]
Add a loop vectorizer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166112
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 17 Oct 2012 17:52:35 +0000 (17:52 +0000)]
Check for empty YMM use-def lists in X86VZeroUpper.
The previous MRI.isPhysRegUsed(YMM0) would also return true when the
function contains a call to a function that may clobber YMM0. That's
most of them.
Checking the use-def chains allows us to skip functions that don't
explicitly mention YMM registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166110
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Wed, 17 Oct 2012 17:37:11 +0000 (17:37 +0000)]
Fix fallout from RegInfo => FrameLowering refactoring on MSP430.
Patch by Job Noorman!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166108
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Wed, 17 Oct 2012 17:27:10 +0000 (17:27 +0000)]
misched: Better handling of invalid latencies in the machine model
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166107
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Wed, 17 Oct 2012 16:36:27 +0000 (16:36 +0000)]
docs: Add link to integrated assembler HowTo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166106
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 17 Oct 2012 16:30:54 +0000 (16:30 +0000)]
Support: Don't remove special files on signals.
- Similar to Path::eraseFromDisk(), we don't want LLVM to remove things like
/dev/null, even if it has the permission.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166105
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Wed, 17 Oct 2012 13:40:06 +0000 (13:40 +0000)]
[asan] better debug diagnostics in asan compiler module
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166102
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 17 Oct 2012 09:23:48 +0000 (09:23 +0000)]
This just in, it is a *bad idea* to use 'udiv' on an offset of
a pointer. A very bad idea. Let's not do that. Fixes PR14105.
Note that this wasn't *that* glaring of an oversight. Originally, these
routines were only called on offsets within an alloca, which are
intrinsically positive. But over the evolution of the pass, they ended
up being called for arbitrary offsets, and things went downhill...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166095
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 17 Oct 2012 08:08:06 +0000 (08:08 +0000)]
Marked this variable as 'used' so that LTO doesn't get rid of it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166092
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 17 Oct 2012 07:22:16 +0000 (07:22 +0000)]
Fix a really annoying "bug" introduced in r165941. The change from that
revision makes no sense. We cannot use the address space of the *post
indexed* type to conclude anything about a *pre indexed* pointer type's
size. More importantly, this index can never be over a pointer. We are
indexing over arrays and vectors here.
Of course, I have no test case here. Neither did the original patch. =/
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166091
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 17 Oct 2012 05:15:58 +0000 (05:15 +0000)]
Remove LLVM_DELETED_FUNCTION from destructors that override non-deleted base class destructors. This isn't legal by the C++11 standard and clang now checks for it. Curiously gcc didn't catch this, possibly because of the template usage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166089
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Wed, 17 Oct 2012 03:59:18 +0000 (03:59 +0000)]
Check SSSE3 instead of SSE4.1
- All shuffle insns required, especially PSHUB, are added in SSSE3.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166086
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Wed, 17 Oct 2012 02:22:27 +0000 (02:22 +0000)]
Fix setjmp on models with non-Small code model nor non-Static relocation model
- MBB address is only valid as an immediate value in Small & Static
code/relocation models. On other models, LEA is needed to load IP address of
the restore MBB.
- A minor fix of MBB in MC lowering is added as well to enable target
relocation flag being propagated into MC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166084
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 17 Oct 2012 01:37:59 +0000 (01:37 +0000)]
Use a SparseSet instead of a BitVector for UsedInInstr in RAFast.
This is just as fast, and it makes it possible to avoid leaking the
UsedPhysRegs BitVector implementation through
MachineRegisterInfo::addPhysRegsUsed().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166083
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 16 Oct 2012 23:46:25 +0000 (23:46 +0000)]
Use a typedef to reduce some typing and reformat code accordingly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166077
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 16 Oct 2012 23:46:23 +0000 (23:46 +0000)]
Variable name cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166076
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 16 Oct 2012 23:46:21 +0000 (23:46 +0000)]
Formatting and 80-col.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166075
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 16 Oct 2012 23:46:19 +0000 (23:46 +0000)]
Spacing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166074
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 16 Oct 2012 22:51:58 +0000 (22:51 +0000)]
Avoid rematerializing a redef immediately after the old def.
PR14098 contains an example where we would rematerialize a MOV8ri
immediately after the original instruction:
%vreg7:sub_8bit<def> = MOV8ri 9; GR32_ABCD:%vreg7
%vreg22:sub_8bit<def> = MOV8ri 9; GR32_ABCD:%vreg7
Besides being pointless, it is also wrong since the original instruction
only redefines part of the register, and the value read by the new
instruction is wrong.
The problem was the LiveRangeEdit::allUsesAvailableAt() didn't
special-case OrigIdx == UseIdx and found the wrong SSA value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166068
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 16 Oct 2012 22:51:55 +0000 (22:51 +0000)]
Revert r166046 "Switch back to the old coalescer for now to fix the 32 bit bit"
A fix for PR14098, including the test case is in the next commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166067
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Tue, 16 Oct 2012 21:29:38 +0000 (21:29 +0000)]
[InstCombine] Teach InstCombine how to handle an obfuscated splat.
An obfuscated splat is where the frontend poorly generates code for a splat
using several different shuffles to create the splat, i.e.,
%A = load <4 x float>* %in_ptr, align 16
%B = shufflevector <4 x float> %A, <4 x float> undef, <4 x i32> <i32 0, i32 0, i32 undef, i32 undef>
%C = shufflevector <4 x float> %B, <4 x float> %A, <4 x i32> <i32 0, i32 1, i32 4, i32 undef>
%D = shufflevector <4 x float> %C, <4 x float> %A, <4 x i32> <i32 0, i32 1, i32 2, i32 4>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166061
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 16 Oct 2012 20:16:20 +0000 (20:16 +0000)]
[ms-inline asm] Add the helper function, isParseringInlineAsm(). To be used in a future commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166054
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Tue, 16 Oct 2012 19:52:32 +0000 (19:52 +0000)]
Simplify code. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166053
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Tue, 16 Oct 2012 19:49:51 +0000 (19:49 +0000)]
Check .rela instead of ELF64 for the compensation vaue resetting
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166051
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Tue, 16 Oct 2012 19:39:40 +0000 (19:39 +0000)]
80-col fixup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166050
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Tue, 16 Oct 2012 19:38:35 +0000 (19:38 +0000)]
Teach DAG combine to fold (trunc (fptoXi x)) to (fptoXi x)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166049
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 16 Oct 2012 19:34:06 +0000 (19:34 +0000)]
Switch back to the old coalescer for now to fix the 32 bit bit
llvm+clang+compiler-rt bootstrap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166046
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Tue, 16 Oct 2012 19:32:31 +0000 (19:32 +0000)]
Simplify potentially quadratic behavior while erasing elements from std::vector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166045
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 16 Oct 2012 18:20:09 +0000 (18:20 +0000)]
And now we can call the other 'get' method from this one and not duplicate the code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166037
91177308-0d34-0410-b5e6-
96231b3b80d8