Richard Osborne [Sat, 4 May 2013 17:01:55 +0000 (17:01 +0000)]
[XCore] Move lowering of thread local storage to a separate pass.
Thread local storage is not supported by the XMOS linker so we handle
thread local variables by lowering the variable to an array of n elements
(where n is the number of hardware threads per core, currently 8
for all XMOS devices) indexed by the the current thread ID.
Previously this lowering was spread across the XCoreISelLowering and the
XCoreAsmPrinter classes. Moving this to a separate pass should be much
cleaner.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181124
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Sat, 4 May 2013 16:54:11 +0000 (16:54 +0000)]
AArch64: assert code model is small for TLS accesses
Supporting TLS in the large memory model is rather difficult at the
moment, so make sure no-one gets into difficulties by mistake.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181121
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Sat, 4 May 2013 16:54:07 +0000 (16:54 +0000)]
AArch64: support literal pool access in large memory model.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181120
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Sat, 4 May 2013 16:54:00 +0000 (16:54 +0000)]
AArch64: support large code model for jump-tables
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181119
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Sat, 4 May 2013 16:53:53 +0000 (16:53 +0000)]
AArch64: implement support for blockaddress in large code model
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181118
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Sat, 4 May 2013 16:53:46 +0000 (16:53 +0000)]
AArch64: implement large code model access to global variables.
The MOVZ/MOVK instruction sequence may not be the most efficient (a
literal-pool load could be better) but adding that would require
reinstating the ConstantIslands pass.
For now the sequence is correct, and that's enough. Beware, as of
commit GNU ld does not appear to support the relocations needed for
this. Its primary purpose (for now) will be to support JITed code,
since in that case there is no guarantee of where your code will end
up in memory relative to external symbols it references.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181117
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Osborne [Sat, 4 May 2013 16:40:58 +0000 (16:40 +0000)]
[XCore] Use static relocation model by default.
This allows us to get get rid of a hack in XCoreTargetObjectFile where the
the DataRel* sections were overridden.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181116
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Sat, 4 May 2013 07:36:23 +0000 (07:36 +0000)]
Allow host triple to be correctly overridden in CMake builds
The intended semantics mirror autoconf, where the user is able to
specify a host triple, but if it's left to the build system then
"config.guess" is invoked for the default.
This also renames the LLVM_HOSTTRIPLE define to LLVM_HOST_TRIPLE to
fit in with the style of the surrounding defines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181112
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 4 May 2013 05:30:49 +0000 (05:30 +0000)]
Optimize llvm-link too.
This takes the linking of almost all modules in a clang build from 6:32
to 0:19.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181105
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 4 May 2013 05:05:18 +0000 (05:05 +0000)]
Fix a performance bug in the Linker.
Now that we hava a convinient place to keep it, remeber the set of
identified structs as we merge modules.
This speeds up the linking of all the bitcode files in clang with the
gold plugin and -plugin-opt=emit-llvm (i.e., link only, no codegen) from
5:25 minutes to 13.6 seconds!
Patch by Xiaofei Wan!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181104
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 4 May 2013 04:08:02 +0000 (04:08 +0000)]
Implement Linker::LinkModules with Linker::linkInModule.
Flipping which one is the implementation will let us optimize linkInModule.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181102
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 4 May 2013 03:48:37 +0000 (03:48 +0000)]
Now that Linker.cpp is almost empty, merge it into LinkModules.cpp.
Also remove unused includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181100
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 4 May 2013 03:06:50 +0000 (03:06 +0000)]
Last batch of cleanups to Linker.h.
Update comments, fix * placement, fix method names that are not
used in clang, add a linkInModule that takes a Mode and put it
in Linker.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181099
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 4 May 2013 02:43:00 +0000 (02:43 +0000)]
Don't construct or delete a module on the Linker.
The linker is now responsible only for actually linking the modules, it
is up to the clients to create and destroy them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181098
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 4 May 2013 02:34:41 +0000 (02:34 +0000)]
Don't store the context in the Linker.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181097
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 4 May 2013 02:28:57 +0000 (02:28 +0000)]
Remove unused members and constructor arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181096
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 4 May 2013 02:21:46 +0000 (02:21 +0000)]
Add missing header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181095
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 4 May 2013 02:13:18 +0000 (02:13 +0000)]
Delete dead code from the linker.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181094
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Sat, 4 May 2013 01:30:49 +0000 (01:30 +0000)]
Use consistent function names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181090
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 4 May 2013 01:08:15 +0000 (01:08 +0000)]
Tabs to spaces. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181082
91177308-0d34-0410-b5e6-
96231b3b80d8
Amara Emerson [Fri, 3 May 2013 23:57:17 +0000 (23:57 +0000)]
Revert r181009.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181079
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Fri, 3 May 2013 23:17:24 +0000 (23:17 +0000)]
Remove some uneeded pseudos in the presence of the naked function attribute.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181072
91177308-0d34-0410-b5e6-
96231b3b80d8
Amara Emerson [Fri, 3 May 2013 22:39:03 +0000 (22:39 +0000)]
Delete test instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181066
91177308-0d34-0410-b5e6-
96231b3b80d8
Amara Emerson [Fri, 3 May 2013 22:27:48 +0000 (22:27 +0000)]
Temporarily disable failing test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181062
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 3 May 2013 21:53:50 +0000 (21:53 +0000)]
Remove this hack. We can support this better with function attributes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181059
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Fri, 3 May 2013 19:53:04 +0000 (19:53 +0000)]
[PowerPC] Avoid using '$' in generated assembler code
PowerPC assemblers are supposed to support a stand-alone '$' symbol
as an alternative of '.' to refer to the current PC. This does not
work in the LLVM assembler parser yet.
To avoid bootstrap failures when using the LLVM assembler as system
assembler, this patch modifies the assembler source code generated
by LLVM to avoid using '$' (and simply use '.' instead).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181054
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Fri, 3 May 2013 19:52:35 +0000 (19:52 +0000)]
[PowerPC] Parse platform-specifc variant kinds in AsmParser
This patch adds support for PowerPC platform-specific variant
kinds in MCSymbolRefExpr::getVariantKindForName, and also
adds a test case to verify they are translated to the appropriate
fixup type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181053
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Fri, 3 May 2013 19:51:09 +0000 (19:51 +0000)]
[PowerPC] Add some Book II instructions to AsmParser
This patch adds a couple of Book II instructions (isync, icbi) to the
PowerPC assembler parser. These are needed when bootstrapping clang
with the integrated assembler forced on, because they are used in
inline asm statements in the code base.
The test case adds the full list of Book II storage control instructions,
including associated extended mnemonics. Again, those that are not yet
supported as marked as FIXME.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181052
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Fri, 3 May 2013 19:50:27 +0000 (19:50 +0000)]
[PowerPC] Support extended mnemonics in AsmParser
This patch adds infrastructure to support extended mnemonics in the
PowerPC assembler parser. It adds support specifically for those
extended mnemonics that LLVM will itself generate.
The test case lists *all* extended mnemonics according to the
PowerPC ISA v2.06 Book I, but marks those not yet supported
as FIXME.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181051
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Fri, 3 May 2013 19:49:39 +0000 (19:49 +0000)]
[PowerPC] Add assembler parser
This adds assembler parser support to the PowerPC back end.
The parser will run for any powerpc-*-* and powerpc64-*-* triples,
but was tested only on 64-bit Linux. The supported syntax is
intended to be compatible with the GNU assembler.
The parser does not yet support all PowerPC instructions, but
it does support anything that is generated by LLVM itself.
There is no support for testing restricted instruction sets yet,
i.e. the parser will always accept any instructions it knows,
no matter what feature flags are given.
Instruction operands will be checked for validity and errors
generated. (Error handling in general could still be improved.)
The patch adds a number of test cases to verify instruction
and operand encodings. The tests currently cover all instructions
from the following PowerPC ISA v2.06 Book I facilities:
Branch, Fixed-point, Floating-Point, and Vector.
Note that a number of these instructions are not yet supported
by the back end; they are marked with FIXME.
A number of follow-on check-ins will add extra features. When
they are all included, LLVM passes all tests (including bootstrap)
when using clang -cc1as as the system assembler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181050
91177308-0d34-0410-b5e6-
96231b3b80d8
Shuxin Yang [Fri, 3 May 2013 19:17:26 +0000 (19:17 +0000)]
Decompose GVN::processNonLocalLoad() (about 400 LOC) into smaller helper functions. No function change.
This function consists of following steps:
1. Collect dependent memory accesses.
2. Analyze availability.
3. Perform fully redundancy elimination, or
4. Perform PRE, depending on the availability
Step 2, 3 and 4 are now moved to three helper routines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181047
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 3 May 2013 18:37:49 +0000 (18:37 +0000)]
[mips] Split the DSP control register and define one register for each field of
its fields.
This removes false dependencies between DSP instructions which access different
fields of the the control register. Implicit register operands are added to
instructions RDDSP and WRDSP after instruction selection, depending on the
value of the mask operand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181041
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Fri, 3 May 2013 17:42:55 +0000 (17:42 +0000)]
LoopVectorizer: Add support for if-conversion of PHINodes with 3+ incoming values.
By supporting the vectorization of PHINodes with more than two incoming values we can increase the complexity of nested if statements.
We can now vectorize this loop:
int foo(int *A, int *B, int n) {
for (int i=0; i < n; i++) {
int x = 9;
if (A[i] > B[i]) {
if (A[i] > 19) {
x = 3;
} else if (B[i] < 4 ) {
x = 4;
} else {
x = 5;
}
}
A[i] = x;
}
}
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181037
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 3 May 2013 17:21:31 +0000 (17:21 +0000)]
R600: Expand vector or, shl, srl, and xor nodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181035
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 3 May 2013 17:21:24 +0000 (17:21 +0000)]
R600: BFI_INT is a vector-only instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181034
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 3 May 2013 17:21:20 +0000 (17:21 +0000)]
R600: Add pattern for SHA-256 Ma function
This can be optimized using the BFI_INT instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181033
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 3 May 2013 17:21:14 +0000 (17:21 +0000)]
R600: Clean up comments in Processors.td
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181032
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 3 May 2013 15:55:06 +0000 (15:55 +0000)]
Autoconf: Compile cxxabi.h in C++ mode.
Should fix PR15877.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181026
91177308-0d34-0410-b5e6-
96231b3b80d8
Tobias Grosser [Fri, 3 May 2013 15:48:34 +0000 (15:48 +0000)]
RegionInfo: Do not crash if unreachable block is found
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181025
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 3 May 2013 14:48:29 +0000 (14:48 +0000)]
CMake: cxxabi.h is only available to C++ compilers, use the right check macro.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181019
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Fri, 3 May 2013 14:32:27 +0000 (14:32 +0000)]
Remove comment that no target supports 128-bit IEEE floats
The soon-to-be-committed SystemZ port uses 128-bit IEEE floats.
MIPS64 GNU/Linux does too (albeit with unusual NaNs).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181016
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Fri, 3 May 2013 14:15:35 +0000 (14:15 +0000)]
[SystemZ] Add MCJIT support
Another step towards reinstating the SystemZ backend. I'll commit
the configure changes separately (TARGET_HAS_JIT etc.), then commit
a patch to enable the MCJIT tests on SystemZ.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181015
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Fri, 3 May 2013 12:22:11 +0000 (12:22 +0000)]
[SystemZ] Support System Z as host architecture
The llvm::sys::AddSignalHandler function (as well as related routines) in
lib/Support/Unix/Signals.inc currently registers a signal handler routine
via "sigaction". When this handler is called due to a SIGSEGV, SIGILL or
similar signal, it will show a stack backtrace, deactivate the handler,
and then simply return to the operating system. The intent is that the
OS will now retry execution at the same location as before, which ought
to again trigger the same error condition and cause the same signal to be
delivered again. Since the hander is now deactivated, the OS will take
its default action (usually, terminate the program and possibly create
a core dump).
However, this method doesn't work reliably on System Z: With certain
signals (namely SIGILL, SIGFPE, and SIGTRAP), the program counter stored
by the kernel on the signal stack frame (which is the location where
execution will resume) is not the instruction that triggered the fault,
but then instruction *after it*. When the LLVM signal handler simply
returns to the kernel, execution will then resume at *that* address,
which will not trigger the problem again, but simply go on and execute
potentially unrelated code leading to random errors afterwards.
To fix this, the patch simply goes and re-raises the signal in question
directly from the handler instead of returning from it. This is done
only on System Z and only for those signals that have this particular
problem.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181010
91177308-0d34-0410-b5e6-
96231b3b80d8
Amara Emerson [Fri, 3 May 2013 11:36:35 +0000 (11:36 +0000)]
Add support for reading ARM ELF build attributes.
Build attribute sections can now be read if they exist via ELFObjectFile, and
the llvm-readobj tool has been extended with an option to dump this information
if requested. Regression tests are also included which exercise these features.
Also update the docs with a fixed ARM ABI link and a new link to the Addenda
which provides the build attributes specification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181009
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Fri, 3 May 2013 11:11:15 +0000 (11:11 +0000)]
[SystemZ] Add ELF relocation support
Another step towards reinstating the SystemZ backend. Tests will be
included in the main backend patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181008
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Fri, 3 May 2013 11:05:17 +0000 (11:05 +0000)]
[SystemZ] Add llvm::Triple::systemz
First step towards reinstating the SystemZ backend. Tests will be
included in the main backend patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181007
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 3 May 2013 10:20:08 +0000 (10:20 +0000)]
X86: Add target description for btver2; make autodetection logic aware of AVX.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181005
91177308-0d34-0410-b5e6-
96231b3b80d8
Pekka Jaaskelainen [Fri, 3 May 2013 07:37:04 +0000 (07:37 +0000)]
Added pocl and TCE blurbs to the ReleaseNotes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181001
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Fri, 3 May 2013 02:52:21 +0000 (02:52 +0000)]
Unbreaking the non-x86 build bots by protecting the AVX test code properly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180992
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Fri, 3 May 2013 02:39:21 +0000 (02:39 +0000)]
Correctly testing for AVX support in x86 based off code from Hosts.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180991
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 3 May 2013 01:29:31 +0000 (01:29 +0000)]
[mips] Remove "Commutative" from property list of non-commutative intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180988
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Fri, 3 May 2013 00:54:56 +0000 (00:54 +0000)]
Fix missing include in Hexagon code for Release+Asserts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180983
91177308-0d34-0410-b5e6-
96231b3b80d8
John McCall [Fri, 3 May 2013 00:15:41 +0000 (00:15 +0000)]
In MC asm parsing, account for the possibility of whitespace within
the "identifier" parsed by the frontend callback by skipping forward
until we've consumed a token that ends at the point dictated by the
callback.
In addition, inform the callback when it's parsing an unevaluated
operand (e.g. mov eax, LENGTH A::x) as opposed to an evaluated one
(e.g. mov eax, [A::x]).
This commit depends on a clang commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180978
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Thu, 2 May 2013 23:07:05 +0000 (23:07 +0000)]
[mips] Handle reading, writing or copying of ccond field of DSP control
register.
- Define pseudo instructions which store or load ccond field of the DSP
control register.
- Emit the pseudos in MipsSEInstrInfo::storeRegToStack and loadRegFromStack.
- Expand the pseudos before callee-scan save.
- Emit instructions RDDSP or WRDSP to copy between ccond field and GPRs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180969
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 2 May 2013 22:52:47 +0000 (22:52 +0000)]
Remove redundant flag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180967
91177308-0d34-0410-b5e6-
96231b3b80d8
Jyotsna Verma [Thu, 2 May 2013 22:10:59 +0000 (22:10 +0000)]
reverting r180953
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180964
91177308-0d34-0410-b5e6-
96231b3b80d8
Vincent Lejeune [Thu, 2 May 2013 21:53:03 +0000 (21:53 +0000)]
R600: Signed literals are 64bits wide
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180960
91177308-0d34-0410-b5e6-
96231b3b80d8
Vincent Lejeune [Thu, 2 May 2013 21:52:55 +0000 (21:52 +0000)]
R600: If previous bundle is dot4, PV valid chan is always X
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180959
91177308-0d34-0410-b5e6-
96231b3b80d8
Vincent Lejeune [Thu, 2 May 2013 21:52:46 +0000 (21:52 +0000)]
R600: Add a test to check that use_kill is emitted
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180958
91177308-0d34-0410-b5e6-
96231b3b80d8
Vincent Lejeune [Thu, 2 May 2013 21:52:40 +0000 (21:52 +0000)]
R600: Improve asmPrint of ALU clause
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180957
91177308-0d34-0410-b5e6-
96231b3b80d8
Vincent Lejeune [Thu, 2 May 2013 21:52:30 +0000 (21:52 +0000)]
R600: Prettier asmPrint of Alu
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180956
91177308-0d34-0410-b5e6-
96231b3b80d8
Jyotsna Verma [Thu, 2 May 2013 21:21:57 +0000 (21:21 +0000)]
Hexagon: Add multiclass/encoding bits for the New-Value Jump instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180953
91177308-0d34-0410-b5e6-
96231b3b80d8
Shuxin Yang [Thu, 2 May 2013 21:14:31 +0000 (21:14 +0000)]
[GV] Remove dead code which is really difficult to decipher.
Actually it took me couple of hours trying to make sense of them and
only to find they are dead code. I guess the original author used
"allSingleSucc" to indicate if there are any critial edge emanating
from some blocks, and tried to perform code motion (actually speculation)
in the presence of these critical edges; but later on he/she changed mind
and decided to perform edge-splitting first.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180951
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 2 May 2013 21:09:03 +0000 (21:09 +0000)]
We don't want FP elimination when doing an Apple-style build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180949
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Thu, 2 May 2013 20:30:27 +0000 (20:30 +0000)]
Replaced usages of size_type with size_t to be more consistent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180947
91177308-0d34-0410-b5e6-
96231b3b80d8
Pranav Bhandarkar [Thu, 2 May 2013 20:22:51 +0000 (20:22 +0000)]
Hexagon - Add peephole optimizations for zero extends.
* lib/Target/Hexagon/HexagonInstrInfo.td: Add patterns to combine a
sequence of a pair of i32->i64 extensions followed by a "bitwise or"
into COMBINE_rr.
* lib/Target/Hexagon/HexagonPeephole.cpp: Copy propagate Rx in the
instruction Rp = COMBINE_Ir_V4(0, Rx) to the uses of Rp:subreg_loreg.
* test/CodeGen/Hexagon/union-1.ll: New test.
* test/CodeGen/Hexagon/combine_ir.ll: Fix test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180946
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Thu, 2 May 2013 18:28:03 +0000 (18:28 +0000)]
[mips] Fix the head Mips16RegisterInfo.cpp comment
...aka a test commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180936
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Thu, 2 May 2013 18:11:35 +0000 (18:11 +0000)]
TBAA: remove !tbaa from testing cases if not used.
This will make it easier to turn on struct-path aware TBAA since the metadata
format will change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180935
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Thu, 2 May 2013 17:27:49 +0000 (17:27 +0000)]
Provide an API to temporarily suppress DebugLocations from being attached
to emitted instructions. Use this if you want an instruction to be
counted towards the prologue or if there is no useful source location.
rdar://problem/
13442648
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180929
91177308-0d34-0410-b5e6-
96231b3b80d8
Jyotsna Verma [Thu, 2 May 2013 15:39:30 +0000 (15:39 +0000)]
Hexagon: Honor __builtin_expect by using branch probabilities.
* lib/Target/Hexagon/HexagonInstrInfo.cpp (GetDotNewPredOp):
Given a jump opcode return the right pred.new jump opcode with
a taken vs not-taken hint based on branch probabilities provided
by the target independent module.
* lib/Target/Hexagon/HexagonVLIWPacketizer.cpp: Use the above function.
* lib/Target/Hexagon/HexagonNewValueJump.cpp(getNewvalueJumpOpcode):
Enhance existing function use branch probabilities like
HexagonInstrInfo::GetDotNewPredOp but for New Value (GPR) Jumps.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180923
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Thu, 2 May 2013 15:30:12 +0000 (15:30 +0000)]
R600: Use new tablegen syntax for patterns
All but two patterns have been converted to the new syntax. The
remaining two patterns will require COPY_TO_REGCLASS instructions, which
the VLIW DAG Scheduler cannot handle.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180922
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Thu, 2 May 2013 15:30:07 +0000 (15:30 +0000)]
R600/SI: remove nonsense select pattern
Fortunately this pattern never matched, otherwise
we would have generated incorrect code.
Signed-off-by: Christian K??nig <christian.koenig@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180921
91177308-0d34-0410-b5e6-
96231b3b80d8
Tobias Grosser [Thu, 2 May 2013 14:59:52 +0000 (14:59 +0000)]
Added table of contents declaration in CommandLine Library documentation.
Contributed-by: Dan Liew <daniel.liew@imperial.ac.uk>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180919
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Thu, 2 May 2013 09:22:04 +0000 (09:22 +0000)]
80-col fixup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180915
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Thu, 2 May 2013 09:18:38 +0000 (09:18 +0000)]
Avoid duplicating logic on frame register selecting when lowering eh_return
No functionality change
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180914
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Thu, 2 May 2013 08:21:56 +0000 (08:21 +0000)]
Avoid duplicating logic on frame register selecting when lowering frameaddr
No functionality change
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180912
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Thu, 2 May 2013 06:20:42 +0000 (06:20 +0000)]
Rewrite X86 codegen regression test with FileCheck
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180910
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Thu, 2 May 2013 02:44:23 +0000 (02:44 +0000)]
Add a test for the foldSelectICmpAndOr fix committed in r180779.
This tests a case where C1 and C2 were the same but X and Y were different
widths.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180907
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 2 May 2013 02:07:32 +0000 (02:07 +0000)]
TiedTo flag can now be placed on implicit operands. isTwoAddrUse() should look
at all of the operands. Previously it was skipping over implicit operands which
cause infinite looping when the two-address pass try to reschedule a
two-address instruction below the kill of tied operand.
I'm unable to come up with a reasonably sized test case.
rdar://
13747577
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180906
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Wed, 1 May 2013 23:41:31 +0000 (23:41 +0000)]
[mips] Rename class and functions. Simplify code.
No functionality changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180897
91177308-0d34-0410-b5e6-
96231b3b80d8
Filip Pizlo [Wed, 1 May 2013 22:58:00 +0000 (22:58 +0000)]
This exposes more MCJIT options via the C API:
CodeModel: It's now possible to create an MCJIT instance with any CodeModel you like. Previously it was only possible to
create an MCJIT that used CodeModel::JITDefault.
EnableFastISel: It's now possible to turn on the fast instruction selector.
The CodeModel option required some trickery. The problem is that previously, we were ensuring future binary compatibility in
the MCJITCompilerOptions by mandating that the user bzero's the options struct and passes the sizeof() that he saw; the
bindings then bzero the remaining bits. This works great but assumes that the bitwise zero equivalent of any field is a
sensible default value.
But this is not the case for LLVMCodeModel, or its internal equivalent, llvm::CodeModel::Model. In both of those, the default
for a JIT is CodeModel::JITDefault (or LLVMCodeModelJITDefault), which is not bitwise zero.
Hence this change introduces LLVMInitializeMCJITCompilerOptions(), which will initialize the user's options struct with
defaults. The user will use this in the same way that they would have previously used memset() or bzero(). MCJITCAPITest.cpp
illustrates the change, as does the comment in ExecutionEngine.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180893
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Wed, 1 May 2013 22:46:50 +0000 (22:46 +0000)]
Avoid generating tempfile(s) never used
As DejaGNU is deprecated, it seems pipe-jam issue doesn't exist any more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180892
91177308-0d34-0410-b5e6-
96231b3b80d8
Filip Pizlo [Wed, 1 May 2013 22:41:26 +0000 (22:41 +0000)]
Rename 'struct LLVMTargetMachine' to 'struct LLVMOpaqueTargetMachine'.
This avoids namespace collisions with llvm::LLVMTargetMachine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180891
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 1 May 2013 22:32:08 +0000 (22:32 +0000)]
Revert r180737. The companion patch was reverted, and this is not relevant right now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180889
91177308-0d34-0410-b5e6-
96231b3b80d8
Jyotsna Verma [Wed, 1 May 2013 21:37:34 +0000 (21:37 +0000)]
Hexagon: Use multiclass for Jump instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180885
91177308-0d34-0410-b5e6-
96231b3b80d8
Jyotsna Verma [Wed, 1 May 2013 21:27:30 +0000 (21:27 +0000)]
Hexagon: Clear isKill flag on the predicate register in
PredicateInstruction function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180884
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 1 May 2013 21:05:05 +0000 (21:05 +0000)]
Add support for other typeinfo encodings in the ExceptionDemo.
The old jit always uses DW_EH_PE_absptr, but MCJIT can use other encodings.
This is in preparation for adding EH support to MCJIT, but not directly
related, so I am committing it first.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180883
91177308-0d34-0410-b5e6-
96231b3b80d8
Filip Pizlo [Wed, 1 May 2013 21:01:06 +0000 (21:01 +0000)]
Fix file header comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180882
91177308-0d34-0410-b5e6-
96231b3b80d8
Filip Pizlo [Wed, 1 May 2013 20:59:00 +0000 (20:59 +0000)]
This patch breaks up Wrap.h so that it does not have to include all of
the things, and renames it to CBindingWrapping.h. I also moved
CBindingWrapping.h into Support/.
This new file just contains the macros for defining different wrap/unwrap
methods.
The calls to those macros, as well as any custom wrap/unwrap definitions
(like for array of Values for example), are put into corresponding C++
headers.
Doing this required some #include surgery, since some .cpp files relied
on the fact that including Wrap.h implicitly caused the inclusion of a
bunch of other things.
This also now means that the C++ headers will include their corresponding
C API headers; for example Value.h must include llvm-c/Core.h. I think
this is harmless, since the C API headers contain just external function
declarations and some C types, so I don't believe there should be any
nasty dependency issues here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180881
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Wed, 1 May 2013 19:53:30 +0000 (19:53 +0000)]
SROA: Generate selects instead of shuffles when blending values because this is the cannonical form.
Shuffles are more difficult to lower and we usually don't touch them, while we do optimize selects more often.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180875
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 1 May 2013 19:49:26 +0000 (19:49 +0000)]
[inline asm] Return an undef SDValue of the expected value type, rather than
report a fatal error. This allows us to continue processing the translation
unit. Test case to come on the clang side because we need an inline asm
diagnostics handler in place.
rdar://
13446483
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180873
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Wed, 1 May 2013 19:18:51 +0000 (19:18 +0000)]
Optimize away nop CONCAT_VECTOR nodes.
Optimize CONCAT_VECTOR nodes that merge EXTRACT_SUBVECTOR values that extract from the same vector.
rdar://
13402653
PR15866
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180871
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Wed, 1 May 2013 19:13:50 +0000 (19:13 +0000)]
Updating the getting started guide for Visual Studio users. Specifically, pointing out that you have to pass additional parameters to llvm-lit and explicitly specify python on the command line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180869
91177308-0d34-0410-b5e6-
96231b3b80d8
Peng Cheng [Wed, 1 May 2013 15:04:18 +0000 (15:04 +0000)]
get rid of windows warning:
warning C4946: reinterpret_cast used between related classes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180852
91177308-0d34-0410-b5e6-
96231b3b80d8
Peng Cheng [Wed, 1 May 2013 15:00:07 +0000 (15:00 +0000)]
get rid of windows warning:
warning C4800: forcing value to bool 'true' or 'false' (performance warning)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180851
91177308-0d34-0410-b5e6-
96231b3b80d8
Peng Cheng [Wed, 1 May 2013 14:54:01 +0000 (14:54 +0000)]
replace reinterpret_cast by cast or remove reinterpret_cast to get rid of windows warning: warning C4946: reinterpret_cast used between related classes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180850
91177308-0d34-0410-b5e6-
96231b3b80d8
Peng Cheng [Wed, 1 May 2013 14:18:06 +0000 (14:18 +0000)]
fix windows warning.
warning C4244: 'argument' : conversion from 'uint64_t' to 'const unsigned int', possible loss of data
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180847
91177308-0d34-0410-b5e6-
96231b3b80d8
Peng Cheng [Wed, 1 May 2013 14:07:02 +0000 (14:07 +0000)]
use static_cast to get rid of windows warning.
warning C4244: 'argument' : conversion from 'uint64_t' to 'const unsigned int', possible loss of data
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180846
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 1 May 2013 13:07:03 +0000 (13:07 +0000)]
Now that the underlying issue is fixed, revert r180750 and r180722.
The cause of the windows failures was fixed by r180791. Revert to the state
after Sabre's original revert.
Original message:
revert r179735, it has no testcases, and doesn't really make sense.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180844
91177308-0d34-0410-b5e6-
96231b3b80d8
Nikola Smiljanic [Wed, 1 May 2013 13:05:43 +0000 (13:05 +0000)]
Fix spelling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180843
91177308-0d34-0410-b5e6-
96231b3b80d8