Benjamin Kramer
7808f22a33
Symbol hygiene: Make sure declarations and definitions match, make helper functions static.
...
llvm-svn: 166376
2012-10-20 12:53:26 +00:00
Benjamin Kramer
7e11b31d39
SROA: Simplify code. No functionality change.
...
llvm-svn: 166375
2012-10-20 12:04:57 +00:00
Benjamin Kramer
f3ac3fa22b
InstCombine: Fix an edge case where constant icmps could sneak into ConstantFoldInstOperands and crash.
...
Have to refactor the ConstantFolder interface one day to define bugs like this away. Fixes PR14131.
llvm-svn: 166374
2012-10-20 08:43:52 +00:00
Nadav Rotem
cdd573e703
Vectorize: teach cavVectorizeMemory to distinguish between A[i]+=x and A[B[i]]+=x.
...
If the pointer is consecutive then it is safe to read and write. If the pointer is non-loop-consecutive then
it is unsafe to vectorize it because we may hit an ordering issue.
llvm-svn: 166371
2012-10-20 08:26:33 +00:00
Nadav Rotem
762317ecc6
Fix a typo
...
llvm-svn: 166367
2012-10-20 05:03:27 +00:00
Nadav Rotem
4e013454ca
Vectorizer: refactor the memory checks to a new function. No functionality change.
...
llvm-svn: 166366
2012-10-20 04:59:06 +00:00
Nadav Rotem
33b2c76073
Vectorization docs.
...
llvm-svn: 166364
2012-10-20 02:34:34 +00:00
Chad Rosier
f81bc67275
[ms-inline asm] Rename AsmOpRewrite to just AsmRewrite to be more generic. No functional change intended.
...
llvm-svn: 166360
2012-10-20 01:02:45 +00:00
Chad Rosier
be98459bfd
[ms-inline asm] If the state of the parser is ignore, then don't parse the
...
inline assembly. Also make sure the remove the ignored statements from the IR.
llvm-svn: 166357
2012-10-20 00:47:08 +00:00
Nadav Rotem
61a5b018ad
LoopVectorize: Keep the IRBuilder on the stack.
...
llvm-svn: 166354
2012-10-19 23:27:19 +00:00
Chad Rosier
03179afe79
[ms-inline asm] Continue parsing even when we're in an ignore block.
...
llvm-svn: 166352
2012-10-19 23:15:00 +00:00
Nadav Rotem
8fe03aa4c1
Vectorizer: Add support for loop reductions.
...
For example:
for (i=0; i<n; i++)
sum += A[i] + B[i] + i;
llvm-svn: 166351
2012-10-19 23:05:40 +00:00
Shuxin Yang
d8a190a17c
1. Remove noreturn attribute from __builtin_debugtrap().
...
(The change at Clang side was committed in r166345)
2. Cosmetic change in order to conform to coding standards.
llvm-svn: 166350
2012-10-19 23:00:20 +00:00
Chad Rosier
3d1b58e0f9
[ms-inline asm] Reset the opcode prior to parsing a statement.
...
llvm-svn: 166349
2012-10-19 22:57:33 +00:00
Akira Hatanaka
5439c43726
[mips] Use 64-bit registers to return an sret pointer if target ABI is N64.
...
llvm-svn: 166344
2012-10-19 22:11:40 +00:00
Eric Christopher
42faa398e7
Grammar-o.
...
llvm-svn: 166343
2012-10-19 22:10:54 +00:00
Akira Hatanaka
32235d5612
[mips] Add code to do tail call optimization.
...
Currently, it is enabled only if option "enable-mips-tail-calls" is given and
all of the callee's arguments are passed in registers.
llvm-svn: 166342
2012-10-19 21:47:33 +00:00
Akira Hatanaka
18ec43c9c2
[mips] Fix TAILCALL's operand node type.
...
llvm-svn: 166341
2012-10-19 21:30:15 +00:00
Nadav Rotem
13a468b929
revert r166264 because the LTO build is still failing
...
llvm-svn: 166340
2012-10-19 21:28:43 +00:00
Akira Hatanaka
d728ae0014
[mips] Delete MipsFunctionInfo::MaxCallFrameSize which is no longer used.
...
llvm-svn: 166339
2012-10-19 21:18:38 +00:00
Akira Hatanaka
54f6697369
[mips] Add tail call instructions.
...
llvm-svn: 166338
2012-10-19 21:14:34 +00:00
Akira Hatanaka
8198825482
[mips] Make the branch nodes used in jump instructions a template parameter.
...
llvm-svn: 166337
2012-10-19 21:11:03 +00:00
Akira Hatanaka
cfc486ced3
Add node and enum for mips tail call.
...
llvm-svn: 166318
2012-10-19 20:59:39 +00:00
Chad Rosier
b2e9c0e226
[ms-inline asm] Have the TargetParser callback to Sema to determine the size of
...
a memory operand. Retain this information and then add the sizing directives
to the IR. This allows the backend to do proper instruction selection.
llvm-svn: 166316
2012-10-19 20:57:14 +00:00
Michael Liao
432bf8dcf1
Add 'IntrNoReturn' for longjmp intrinsics
...
llvm-svn: 166314
2012-10-19 20:43:54 +00:00
Benjamin Kramer
0edfdde403
SimplifyLibcalls: The return value of ffsll is always i32, even when the input is zero.
...
Fixes PR13028.
llvm-svn: 166313
2012-10-19 20:43:44 +00:00
Micah Villmow
4dcbb3e605
Fix a build error for ocaml bindings that was introduced with the TargetData --> DataLayout changes.
...
llvm-svn: 166309
2012-10-19 20:36:22 +00:00
Chad Rosier
9de7b4647d
[ms-inline asm] Add a MCAsmParserSemaCallback to the TargetAsmParser.
...
llvm-svn: 166308
2012-10-19 20:35:42 +00:00
Daniel Dunbar
7abcd13b24
lit: Rename the valgrind leaks feature to match what is currently used
...
(vg_leak).
llvm-svn: 166306
2012-10-19 20:29:30 +00:00
Daniel Dunbar
48d2376b89
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.
llvm-svn: 166305
2012-10-19 20:29:27 +00:00
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