1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
Commit Graph

85939 Commits

Author SHA1 Message Date
Daniel Dunbar
4747331126 lit: Add 'valgrind' and 'valgrind-leaks' features when valgrind is used.
- These can be used with the XFAIL options.

llvm-svn: 166303
2012-10-19 20:12:00 +00:00
Daniel Dunbar
9d930b0d06 tests: Stop mangling '-vg' into the triple, we don't use this currently.
- Also, lit is going to get a valgrind feature, instead.

llvm-svn: 166302
2012-10-19 20:11:56 +00:00
Shuxin Yang
3ad15929e7 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. 

llvm-svn: 166300
2012-10-19 20:11:16 +00:00
Chad Rosier
2f344f2453 [ms-inline asm] Add the isParsingInlineAsm() function to the MCAsmTargetParser.
llvm-svn: 166292
2012-10-19 17:57:49 +00:00
Benjamin Kramer
49175bcdcd Indvars: Don't recursively delete instruction during BB iteration.
This can invalidate the iterators leading to use after frees and crashes.
Fixes PR12536.

llvm-svn: 166291
2012-10-19 17:53:54 +00:00
Daniel Dunbar
05096e6a09 Fix some doc-os.
llvm-svn: 166290
2012-10-19 17:23:39 +00:00
Daniel Dunbar
b86f0140e9 lit: Propagate TERM variable in environment, some tools can do really obscure
odd things if this is missing.

llvm-svn: 166289
2012-10-19 17:23:34 +00:00
Michael Liao
9984a3bee3 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.

llvm-svn: 166288
2012-10-19 17:15:18 +00:00
Benjamin Kramer
77d71ab3d7 SCEVExpander: Don't crash when trying to merge two constant phis.
Just constant fold them so they can't cause any trouble. Fixes PR12627.

llvm-svn: 166286
2012-10-19 16:37:30 +00:00
Alexey Samsonov
947d01e1c5 [ASan] Support comments in ASan/TSan blacklist file as lines starting with #
llvm-svn: 166283
2012-10-19 15:24:46 +00:00
Evgeniy Stepanov
3628bf2d69 Move SplitBlockAndInsertIfThen to BasicBlockUtils.
llvm-svn: 166278
2012-10-19 10:48:31 +00:00
Benjamin Kramer
5080891e07 LoopVectorize: Keep the IRBuilder on the stack.
No functionality change.

llvm-svn: 166274
2012-10-19 08:42:02 +00:00
Stepan Dyatkovskiy
ece4c2a9c1 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.

llvm-svn: 166273
2012-10-19 08:23:06 +00:00
Nick Lewycky
c111dcf2c1 Pacify -Wnon-virtual-dtor.
llvm-svn: 166270
2012-10-19 07:00:09 +00:00
Kostya Serebryany
83b25ee2df [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.
llvm-svn: 166267
2012-10-19 06:20:53 +00:00
Nadav Rotem
ac33a84388 recommit the patch that makes LSR and LowerInvoke use the TargetTransform interface.
llvm-svn: 166264
2012-10-19 04:27:49 +00:00
Michael Liao
cdcbe73b38 Simplify condition checking as CONCAT assume all inputs of the same type.
llvm-svn: 166260
2012-10-19 03:17:00 +00:00
Nadav Rotem
451f76acc3 vectorizer: Add support for reading and writing from the same memory location.
llvm-svn: 166255
2012-10-19 01:24:18 +00:00
Nadav Rotem
3cce3abf28 Reapply the TargerTransformInfo changes, minus the changes to LSR and Lowerinvoke.
llvm-svn: 166248
2012-10-18 23:22:48 +00:00
Nadav Rotem
fe5d8c8c09 cleanup the comment.
llvm-svn: 166247
2012-10-18 23:21:01 +00:00
Jordan Rose
2d1d4bb52f Fix case for include of Compiler.h.
llvm-svn: 166243
2012-10-18 22:36:01 +00:00
Jordan Rose
254e676432 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.

llvm-svn: 166242
2012-10-18 22:22:58 +00:00
Jordan Rose
8f3fa09912 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.

llvm-svn: 166241
2012-10-18 22:22:55 +00:00
Bob Wilson
93c7551fe3 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.

llvm-svn: 166239
2012-10-18 22:03:31 +00:00
Kevin Enderby
300b29c6b4 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().

llvm-svn: 166234
2012-10-18 21:49:18 +00:00
Nadav Rotem
ac2f32d807 fix a naming typo
llvm-svn: 166232
2012-10-18 21:45:31 +00:00
Daniel Dunbar
0f4b851ce7 test: Add a lit config variable to check if LTO is enabled.
llvm-svn: 166225
2012-10-18 20:43:11 +00:00
Daniel Dunbar
edc1b1982d lit: Allow XFAIL: lines to also refer to "features".
llvm-svn: 166224
2012-10-18 20:43:04 +00:00
Chad Rosier
2a7f9576bc [ms-inline asm] Add a size argument to the LookupInlineAsmIdentifier() callback,
which will be used by the asm matcher in the near future.

llvm-svn: 166222
2012-10-18 20:27:15 +00:00
Bob Wilson
62af1bf601 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.

llvm-svn: 166220
2012-10-18 20:25:36 +00:00
Sebastian Pop
324f8ad699 Use pre-python 2.5 syntax in lit.cfg.
Author:    Quentin Neill <qneill@codeaurora.org>
llvm-svn: 166217
2012-10-18 19:58:28 +00:00
Sebastian Pop
2e267f64cb 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>
llvm-svn: 166216
2012-10-18 19:53:48 +00:00
Sebastian Pop
23cbb6a693 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>
llvm-svn: 166215
2012-10-18 19:53:45 +00:00
Chad Rosier
5c17ae1754 [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.

llvm-svn: 166212
2012-10-18 19:39:30 +00:00
Bob Wilson
8e22c076f2 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.

llvm-svn: 166207
2012-10-18 18:52:54 +00:00
Nadav Rotem
b1d0bfd68b Avoid reconstructing the pointer set when searching for duplicated read/write pointers.
llvm-svn: 166205
2012-10-18 18:34:50 +00:00
Micah Villmow
f708318a81 Update the LangRef documentation for the per pointer address space support.
llvm-svn: 166201
2012-10-18 18:18:17 +00:00
Meador Inge
90bff969e1 Cosmetic change -- move two simplifiers to the right commented statement group.
llvm-svn: 166199
2012-10-18 18:12:43 +00:00
Meador Inge
4cd6c97082 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.

llvm-svn: 166198
2012-10-18 18:12:40 +00:00
Eli Bendersky
d53d4452a7 test commit: verifying access from new address
llvm-svn: 166197
2012-10-18 18:12:05 +00:00
Nadav Rotem
12105d6078 In SimplifySelectOps we pulled two loads through a select node despite the fact that one was dependent on the other.
rdar://12513091

llvm-svn: 166196
2012-10-18 18:06:48 +00:00
Nadav Rotem
f1bbc20bb0 When looking for a vector representation of a scalar, do a single lookup. Also, cache the result of the broadcast instruction.
No functionality change.

llvm-svn: 166191
2012-10-18 17:31:49 +00:00
Chad Rosier
72377848a3 [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.

llvm-svn: 166183
2012-10-18 15:49:34 +00:00
Ulrich Weigand
2248bca601 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).

llvm-svn: 166178
2012-10-18 13:16:11 +00:00
Chandler Carruth
d7930e6205 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.

llvm-svn: 166176
2012-10-18 09:56:08 +00:00
Chandler Carruth
b0b1a55418 This FIXME was fixed some time ago. =]
llvm-svn: 166175
2012-10-18 09:56:06 +00:00
Chandler Carruth
7bfc26a7b4 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.

llvm-svn: 166172
2012-10-18 08:05:46 +00:00
Nadav Rotem
76ff018e87 remove unused variable to fix a warning.
llvm-svn: 166170
2012-10-18 06:09:21 +00:00
Nadav Rotem
7293669878 Add a small example which shows a vectorizable loop with a non-pow-of-two count
llvm-svn: 166169
2012-10-18 05:46:16 +00:00
Bob Wilson
b6adb70bdd 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

llvm-svn: 166168
2012-10-18 05:43:52 +00:00