Commit Graph

67236 Commits

Author SHA1 Message Date
Daniel Dunbar
6d135972bf lli: Add stub -use-mcjit option, which doesn't currently do anything.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119508 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-17 16:06:37 +00:00
Duncan Sands
6fb881c036 Have InlineFunction use SimplifyInstruction rather than
hasConstantValue.  I was leery of using SimplifyInstruction
while the IR was still in a half-baked state, which is the
reason for delaying the simplification until the IR is fully
cooked.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119494 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-17 11:16:23 +00:00
Duncan Sands
23a19572b2 Now that hasConstantValue has been made simpler, it may return the
phi node itself if it occurs in an unreachable basic block.  Protect
against this.  Hopefully this will fix some more buildbots.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119493 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-17 10:23:23 +00:00
Evan Cheng
baa45f7298 Revert r119109 for now. It's breaking 176.gcc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119492 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-17 09:31:04 +00:00
Duncan Sands
d261dc650a Previously SimplifyInstruction could report that an instruction
simplified to itself (this can only happen in unreachable blocks).
Change it to return null instead.  Hopefully this will fix some
buildbot failures.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119490 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-17 08:35:29 +00:00
Chris Lattner
ce1b9ad539 With the newly simplified SourceMgr interfaces and the generalized
SrcMgrDiagHandler, we can improve clang diagnostics for inline asm:
instead of reporting them on a source line of the original line,
we can report it on the correct line wherever the string literal came
from. For something like this:

void foo() {
  asm("push %rax\n"
      ".code32\n");
}

we used to get this: (note that the line in t.c isn't helpful)

t.c:4:7: error: warning: ignoring directive for now
  asm("push %rax\n"
      ^
<inline asm>:2:1: note: instantiated into assembly here
.code32
^

now we get:

t.c:5:8: error: warning: ignoring directive for now
      ".code32\n"
       ^
<inline asm>:2:1: note: instantiated into assembly here
.code32
^

Note that we're pointing to line 5 properly now.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119488 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-17 08:20:42 +00:00
Chris Lattner
4afa12890f now that AsmPrinter::EmitInlineAsm is factored right, we can eliminate the
cookie argument to the SourceMgr diagnostic stuff.  This cleanly separates
LLVMContext's inlineasm handler from the sourcemgr error handling 
definition, increasing type safety and cleaning things up.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119486 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-17 08:13:01 +00:00
Che-Liang Chiou
3f409f7fef Add simple arithmetics and %type directive for PTX
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119485 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-17 08:08:49 +00:00
Evan Cheng
3642e64c11 Simplify code that toggle optional operand to ARM::CPSR.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119484 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-17 08:06:50 +00:00
Chris Lattner
6e30c6a1d3 rearrange how the handler in SourceMgr is installed, eliminating the use of
the cookie argument to setDiagHandler


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119483 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-17 08:03:32 +00:00
Chris Lattner
a38941d458 refactor the interface to EmitInlineAsm a bit, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119482 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-17 07:53:40 +00:00
Chris Lattner
aa6e350c88 fix PR8613 - Copy constructor of SwitchInst does not call SwitchInst::init
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119463 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-17 05:41:46 +00:00
Chris Lattner
b75c651e22 tidy up
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119462 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-17 05:41:32 +00:00
Bill Wendling
2567eec423 The machine instruction no longer encodes the submode as a separate operand. We
should get the submode from the load/store multiple instruction's opcode.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119461 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-17 05:31:09 +00:00
Bill Wendling
0f63075613 Proper encoding for VLDM and VSTM instructions. The register lists for these
instructions have to distinguish between lists of single- and double-precision
registers in order for the ASM matcher to do a proper job. In all other
respects, a list of single- or double-precision registers are the same as a list
of GPR registers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119460 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-17 04:32:08 +00:00
Duncan Sands
ff10341183 Fix a layering violation: hasConstantValue, which is part of the PHINode
class, uses DominatorTree which is an analysis.  This change moves all of
the tricky hasConstantValue logic to SimplifyInstruction, and replaces it
with a very simple literal implementation.  I already taught users of
hasConstantValue that need tricky stuff to use SimplifyInstruction instead.
I didn't update InlineFunction because the IR looks like it might be in a
funky state at the point it calls hasConstantValue, which makes calling
SimplifyInstruction dangerous since it can in theory do a lot of tricky
reasoning.  This may be a pessimization, for example in the case where
all phi node operands are either undef or a fixed constant.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119459 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-17 04:30:22 +00:00
Duncan Sands
a0c5244e85 Have ScalarEvolution use SimplifyInstruction rather than hasConstantValue.
While there, add a note about an inefficiency I noticed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119458 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-17 04:18:45 +00:00
Duncan Sands
6ac3386e10 Have RemovePredecessorAndSimplify you SimplifyInstruction
rather than hasConstantValue.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119457 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-17 04:12:05 +00:00
Duncan Sands
d32c4a1756 Remove dead code in GVN: now that SimplifyInstruction is called
systematically, CollapsePhi will always return null here.  Note
that CollapsePhi did an extra check, isSafeReplacement, which
the SimplifyInstruction logic does not do.  I think that check
was bogus - I guess we will soon find out!  (It was originally
added in commit 41998 without a testcase).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119456 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-17 04:05:21 +00:00
Dan Gohman
6678e7b6eb Memoize results from ScalarEvolution's getUnsignedRange and getSignedRange.
This fixes some extreme compile times on unrolled sha512 code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119455 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-17 02:44:44 +00:00
Dan Gohman
32df92dde6 Fix warnings about missing parents between || and &&.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119454 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-17 02:40:30 +00:00
Eric Christopher
113a06cff4 Only avoid the check if we're the last operand before the variable
operands in a variadic instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119446 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-17 00:55:36 +00:00
Bill Wendling
6bc105a7b9 Add binary emission stuff for VLDM/VSTM. This reuses the
"getRegisterListOpValue" logic. If the registers are double or single precision,
the value returned is suitable for VLDM/VSTM.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119435 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-17 00:45:23 +00:00
Peter Collingbourne
b1a33c4a59 Fix typo: Exectuable -> Executable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119433 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-17 00:43:43 +00:00
Bob Wilson
6a8aceb50b Use new neon_vector_type and neon_polyvector_type attributes for Neon vectors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119406 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-16 23:57:06 +00:00
Bob Wilson
4fbf63845f Change Neon polynomial types to be signed to match GCC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119405 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-16 23:57:03 +00:00
Bob Wilson
b308b62e6a Refactor to new GetNumElements function.
No functional change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119404 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-16 23:57:01 +00:00
Bill Wendling
3380f6a4d0 Use the correct variable names so that the encodings will be correct.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119403 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-16 23:44:49 +00:00
Dan Gohman
742bf87efa Reapply r118917. With pseudo-instruction expansion moved to
a different pass, the complicated interaction between cmov expansion
and fast isel is no longer a concern.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119400 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-16 22:43:23 +00:00
Chris Lattner
221b239342 update coding standards. Partial specialization is now ok,
though possibly not a good idea.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119398 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-16 22:19:06 +00:00
Oscar Fuentes
975176e5c6 Fix assembling X86CompilationCallback_Win64.asm on VS 10.
Patch by Louis Zhuang!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119394 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-16 22:07:47 +00:00
Dale Johannesen
e8ff69fcb5 Test for llvm-gcc patch 119392.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119393 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-16 21:57:15 +00:00
Chris Lattner
ac139f19d9 libc++ and compiler_rt are now dual licensed under UIUC and MIT license.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119387 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-16 21:32:53 +00:00
Dan Gohman
76043670d5 Fix grammaro.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119386 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-16 21:27:00 +00:00
Evan Cheng
61f1a97e61 Add ExpandPseudos.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119385 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-16 21:20:36 +00:00
Rafael Espindola
af6b580875 Add .loc methods to the streamer.
Next: Add support for the !HasDotLocAndDotFile case to the MCAsmStreamer
and then switch codegen to use it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119384 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-16 21:20:32 +00:00
Dan Gohman
668ac2fdae Split pseudo-instruction expansion into a separate pass, to make it
easier to debug, and to avoid complications when the CFG changes
in the middle of the instruction selection process.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119382 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-16 21:02:37 +00:00
Rafael Espindola
342e39f9e5 Add const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119380 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-16 20:56:23 +00:00
Jakob Stoklund Olesen
f4840c07f8 Fix emergency spilling in LiveIntervals::spillPhysRegAroundRegDefsUses.
Always spill the full representative register at any point where any subregister
is live.

This fixes PR8620 which caused the old logic to get confused and not spill
anything at all.

The fundamental problem here is that the coalescer is too aggressive about
physical register coalescing. It sometimes makes it impossible to allocate
registers without these emergency spills.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119375 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-16 19:55:14 +00:00
Jakob Stoklund Olesen
fd900a2c07 Print out the register class of the current interval.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119374 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-16 19:55:12 +00:00
Peter Collingbourne
5a0a7ced12 Document -enable-no-infs-fp-math and -enable-no-nans-fp-math command line options
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119370 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-16 19:40:13 +00:00
Bob Wilson
6904d7af1c Tidy up some things in <arm_neon.h>.
Stop defining types with "__neon_" prefixes and then using typedefs without
the prefix; there's no reason to do that anymore.  Remove types that combine
multiple Neon vectors and treat them as a single long vector; they are not
used.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119369 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-16 19:39:14 +00:00
Bob Wilson
f18dfec0f7 Reapply "Stop using struct wrappers for Neon vector types in <arm_neon.h>."
I've temporarily disabled the failing clang test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119367 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-16 19:16:06 +00:00
Michael J. Spencer
bd61b4b0b7 system_error: More conditional error codes for Darwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119365 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-16 18:48:21 +00:00
Bob Wilson
1ce588c970 Revert "Stop using struct wrappers for Neon vector types in <arm_neon.h>."
It's breaking buildbots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119363 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-16 18:43:07 +00:00
Rafael Espindola
1fdfbc47d8 Parse and ignore some .cfi_* directives.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119362 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-16 18:34:07 +00:00
Michael J. Spencer
fae76d0734 This is the first step in adding sane error handling support to LLVMSystem.
The system API's will be shifted over to returning an error_code, and returning
other return values as out parameters to the function.

Code that needs to check error conditions will use the errc enum values which
are the same as the posix_errno defines (EBADF, E2BIG, etc...), and are
compatable with the error codes in WinError.h due to some magic in system_error.

An example would be:

if (error_code ec = KillEvil("Java")) { // error_code can be converted to bool.
  handle_error(ec);
}

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119360 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-16 18:31:52 +00:00
Bob Wilson
f93cbbd72e Stop using struct wrappers for Neon vector types in <arm_neon.h>.
Thanks to Nate Begeman for an earlier version of this patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119358 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-16 18:17:03 +00:00
Jim Grosbach
7eee9ab97e Revert inadvertant checkin of CMake libdeps.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119355 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-16 18:14:41 +00:00
Jim Grosbach
7911916cf7 ARM conditional mov encoding fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119354 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-16 18:13:42 +00:00