Commit Graph

91790 Commits

Author SHA1 Message Date
Adrian Prantl
f9bccc2f1a 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
2013-05-02 17:27:49 +00:00
Jyotsna Verma
f945d09d53 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
2013-05-02 15:39:30 +00:00
Tom Stellard
399880527d 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
2013-05-02 15:30:12 +00:00
Tom Stellard
5ed242c240 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
2013-05-02 15:30:07 +00:00
Tobias Grosser
66bb622cff 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
2013-05-02 14:59:52 +00:00
Michael Liao
299eb2e6e1 80-col fixup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180915 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-02 09:22:04 +00:00
Michael Liao
db7da200a4 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
2013-05-02 09:18:38 +00:00
Michael Liao
b9cca13063 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
2013-05-02 08:21:56 +00:00
Michael Liao
149b2a8b92 Rewrite X86 codegen regression test with FileCheck
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180910 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-02 06:20:42 +00:00
David Majnemer
304099a56d 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
2013-05-02 02:44:23 +00:00
Evan Cheng
d4201b6e76 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
2013-05-02 02:07:32 +00:00
Akira Hatanaka
f9a5e7e4e9 [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
2013-05-01 23:41:31 +00:00
Filip Pizlo
0e1327e4aa 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
2013-05-01 22:58:00 +00:00
Michael Liao
2bab197bc8 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
2013-05-01 22:46:50 +00:00
Filip Pizlo
c9e180aaea 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
2013-05-01 22:41:26 +00:00
Bill Wendling
f18a32eb12 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
2013-05-01 22:32:08 +00:00
Jyotsna Verma
6ea706e40e Hexagon: Use multiclass for Jump instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180885 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-01 21:37:34 +00:00
Jyotsna Verma
f9759c9f08 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
2013-05-01 21:27:30 +00:00
Rafael Espindola
58c3aa2049 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
2013-05-01 21:05:05 +00:00
Filip Pizlo
de3931241a Fix file header comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180882 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-01 21:01:06 +00:00
Filip Pizlo
40be1e8566 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
2013-05-01 20:59:00 +00:00
Nadav Rotem
fee6969463 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
2013-05-01 19:53:30 +00:00
Chad Rosier
f0b0755b6e [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
2013-05-01 19:49:26 +00:00
Nadav Rotem
b2ed5fac06 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
2013-05-01 19:18:51 +00:00
Aaron Ballman
a7eccdc59a 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
2013-05-01 19:13:50 +00:00
Peng Cheng
e42240517b 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
2013-05-01 15:04:18 +00:00
Peng Cheng
dc42e3d831 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
2013-05-01 15:00:07 +00:00
Peng Cheng
ae2a1dacb7 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
2013-05-01 14:54:01 +00:00
Peng Cheng
a45391000e 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
2013-05-01 14:18:06 +00:00
Peng Cheng
711d324d50 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
2013-05-01 14:07:02 +00:00
Rafael Espindola
aae0298921 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
2013-05-01 13:07:03 +00:00
Nikola Smiljanic
f2403bbae6 Fix spelling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180843 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-01 13:05:43 +00:00
Rafael Espindola
dc0981d3e0 Put VMOVPQIto64rr in the VRPDI class.
Patch by Joshua Magee.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180842 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-01 13:00:16 +00:00
Duncan Sands
8c3a54998b Correct comment: there is no numTys parameter any more now that this is using
ArrayRef.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180840 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-01 07:54:55 +00:00
Filip Pizlo
a4fa74e381 Wrap some lines to bring MCJITCAPITest into conformance with the 80 column limit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180839 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-01 06:46:59 +00:00
Michael Liao
38d32da0f1 Forget remove the tempfile argument
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180838 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-01 05:45:57 +00:00
Michael Liao
9ed0a1b065 More rewrites of x86 codegen regression tests with FileCheck
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180837 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-01 05:34:30 +00:00
Aaron Ballman
af35d86bbd Fixes a buffer overrun where the allocated buffer wasn't large enough to accommodate the closing quote escape rules in some instances.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180836 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-01 02:53:14 +00:00
Jim Grosbach
10cc563bfe Revert "InstCombine: Fold more shuffles of shuffles."
This reverts commit r180802

There's ongoing discussion about whether this is the right place to make
this transformation. Reverting for now while we figure it out.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180834 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-01 00:25:27 +00:00
Akira Hatanaka
c147c1b994 [mips] Fix handling of instructions which copy to/from accumulator registers.
Expand copy instructions between two accumulator registers before callee-saved
scan is done. Handle copies between integer GPR and hi/lo registers in
MipsSEInstrInfo::copyPhysReg. Delete pseudo-copy instructions that are not
needed.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180827 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-30 23:22:09 +00:00
Stephen Lin
3484da9479 Only pass 'returned' to target-specific lowering code when the value of entire register is guaranteed to be preserved.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180825 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-30 22:49:28 +00:00
Richard Trieu
8e229c24ed Fix a use after free. RI is freed before the call to getDebugLoc(). To
prevent this, capture the location before RI is freed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180824 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-30 22:45:10 +00:00
Akira Hatanaka
cd6c57917d [mips] Instruction selection patterns for DSP-ASE vector select and compare
instructions.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180820 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-30 22:37:26 +00:00
Adrian Prantl
86a87d9ba1 Temporarily revert "Change the informal convention of DBG_VALUE so that we can express a"
because it breaks some buildbots.

This reverts commit 180816.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180819 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-30 22:35:14 +00:00
Adrian Prantl
a2b56692c8 Change the informal convention of DBG_VALUE so that we can express a
register-indirect address with an offset of 0.
It used to be that a DBG_VALUE is a register-indirect value if the offset
(operand 1) is nonzero. The new convention is that a DBG_VALUE is
register-indirect if the first operand is a register and the second
operand is an immediate. For plain registers use the combination reg, reg.

rdar://problem/13658587

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180816 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-30 22:16:46 +00:00
Andrew Trick
f13fc1b23a MI Sched: revert a minor heuristic that snuck in with -misched-vcopy.
I'll fix the heuristic in a general way in a follow-up commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180815 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-30 22:10:59 +00:00
Akira Hatanaka
13ec4812fc [mips] Simplify code.
No intended functionality changes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180807 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-30 21:17:07 +00:00
Nadav Rotem
7fac0ef71c Fix a typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180806 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-30 21:04:51 +00:00
Nadav Rotem
6f4888f259 Update the release notes about the min/max reductions that Arnold added.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180805 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-30 21:04:04 +00:00
Akira Hatanaka
b8b1d35743 [mips] Test for r179873.
Patch by Zoran Jovanovic.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180804 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-30 20:48:49 +00:00