Commit Graph

56295 Commits

Author SHA1 Message Date
Dale Johannesen
6457e63862 Reverting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93819 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 00:12:05 +00:00
Dale Johannesen
f082d7abe1 Revert 93811 per request.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93818 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 00:10:52 +00:00
Dale Johannesen
1b346b7f8f Enable code to emit dbg.declare as DEBUG_VALUE
comments (fast isel, X86).  This doesn't seem
to break any functionality, but will introduce
cases where -g affects the generated code.  I'll
be fixing that.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93811 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-18 23:34:55 +00:00
Victor Hernandez
6cead7879a Add comment that MDNode::getFunction() is not to be used by performance-critical code (currently only used by AsmWriter)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93802 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-18 22:55:08 +00:00
Eli Friedman
74733a7e46 Make opt -O3 act more like clang -O3 etc., by making the inlining thresholds
match.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93798 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-18 22:38:31 +00:00
Eli Friedman
9cfb3adf44 Add some potentially interesting transformations to README.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93797 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-18 22:36:59 +00:00
Bill Wendling
48814681d7 - Add getLSDAEncoding to the PowerPC backend.
- Greatly improve the comments to the getLSDAEncoding method.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93796 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-18 22:36:35 +00:00
Chris Lattner
59780b8017 make llvm-config more portable to windows versions of perl,
patch by Michael Beck!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93793 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-18 22:27:43 +00:00
Chris Lattner
cd5adbbc0c my instcombine transformations to make extension elimination more
aggressive changed the canonical form from sext(trunc(x)) to ashr(lshr(x)),
make sure to transform a couple more things into that canonical form,
and catch a case where we missed turning zext/shl/ashr into a single sext.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93787 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-18 22:19:16 +00:00
Sean Callanan
2122f69c02 Added a newline at the end of SMLoc.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93784 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-18 22:16:54 +00:00
Sean Callanan
76d76d5689 Changed the comment in the file header for SMLoc
to something more accurate.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93782 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-18 22:11:34 +00:00
Eric Christopher
77f79895f8 Have FastISel handle llvm.trap().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93781 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-18 22:11:29 +00:00
Sean Callanan
1ae486a4a0 Split SMLoc out in its own header so that it can
be used independently of SourceMgr.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93780 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-18 22:07:51 +00:00
Jim Grosbach
6a19947dd6 Minor cleanup for jump table printing. Need a reference, not a pointer, for
printing via <<. Otherwise we just print the pointer value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93777 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-18 22:01:39 +00:00
Chris Lattner
1dafbe1738 filecheckize this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93776 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-18 22:00:46 +00:00
Chris Lattner
f08872048f filecheckize
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93775 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-18 21:58:32 +00:00
Chris Lattner
569a7b9237 remove a redundant test, filecheckize another.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93774 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-18 21:55:43 +00:00
Evan Cheng
1ad0e8b576 Canonicalize -1 - x to ~x.
Instcombine does this but apparently there are situations where this pattern will escape the optimizer and / or created by isel. Here is a case that's seen in JavaScriptCore:
  %t1 = sub i32 0, %a
  %t2 = add i32 %t1, -1
The dag combiner pattern: ((c1-A)+c2) -> (c1+c2)-A
will fold it to -1 - %a.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93773 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-18 21:38:44 +00:00
Chris Lattner
2d53c21eca update mkpatch, patch by Garrison Venn!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93771 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-18 21:09:05 +00:00
Victor Hernandez
756462bfbd Make findDbgDeclare/findDbgGlobalDeclare local static functions; avoid Elts array
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93764 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-18 20:42:09 +00:00
Victor Hernandez
54630e1cef Simplify MDNode::getFunction() and assertLocalFunction() by avoiding extra Function* variable and smallptrset since function-local metadata cannot be cyclic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93762 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-18 20:36:54 +00:00
Johnny Chen
eb231ce51d The most significant encoding bit of GPR:$src or GPR:$dst was over-specified in
the various MOV (register) instructions (16-bit Thumb), including tBRIND (the
indirect branch).  Instead of '1', it should be specified as '?', because GPR
only specifies the register class, which includes both hi-and-lo registers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93759 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-18 20:15:56 +00:00
Jim Grosbach
3482c8003a Patch by David Conrad:
"On ARMv6T2 this turns cttz into rbit, clz instead of the 4 instruction
 sequence it is now."




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93758 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-18 19:58:49 +00:00
Devang Patel
f9d5c5cf9f While mapping llvm.dbg.declare intrinsic manually map its operand, if possible,
because it points to an alloca instruction through metadata.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93757 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-18 19:52:14 +00:00
Chris Lattner
b905b09f21 reject some invalid IR. We already assert and reject this from the
.ll parser, but PR6070 wants it in the verifier too.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93756 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-18 19:50:32 +00:00
Bill Wendling
097ea8315f Add FIXME comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93755 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-18 19:47:53 +00:00
Bill Wendling
a8c18890da - Add a comment to the callback indicating that it's *extremely* not a good
idea, but unfortunately necessary.
- Default to using 4-bytes for the LSDA pointer encoding to agree with the
  encoded value in the CIE.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93753 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-18 19:36:27 +00:00
Victor Hernandez
38812dff7d Make printing of metadata more robust when function is not found (which is the normal situation for non function-local metadata)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93748 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-18 19:15:57 +00:00
Daniel Dunbar
d58816f898 Don't try to build compiler-rt if it happens to be checked out into projects/
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93729 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-18 17:52:28 +00:00
Benjamin Kramer
971fd79067 Unnamed symbol index should be >= 1. This was lost during the mangler refactoring. Fixes PR6067.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93724 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-18 14:39:20 +00:00
Benjamin Kramer
4e7e2f5a36 Fix refacto reported by Nicolas Geoffray.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93723 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-18 12:40:05 +00:00
Bob Wilson
9fedc33ca8 Emit spaces after commas in Neon register lists. This is more consistent
with the rest of the assembly output, is easier to read, and matches the
expected output for gcc's Neon tests.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93703 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-18 01:24:43 +00:00
Chris Lattner
aad30363fb switch x86 zerofill emission over to use MCStreamer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93702 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-18 01:21:08 +00:00
Chris Lattner
5957c84e09 Change CurrentFnSym to be a non-const pointer since asmprinter mutates it
as it emits code.  Switch .globl directives to use OutStreamer instead of
doing it textually (in x86)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93700 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-18 00:59:24 +00:00
Chris Lattner
8cb9a3b13f remove the MAI argument to MCExpr::print and switch overthing to use << when printing them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93699 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-18 00:37:40 +00:00
Chris Lattner
950558aa23 unbreak x86 jump tables with my previous patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93698 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-18 00:21:06 +00:00
Chris Lattner
10b318bcb3 now that MCSymbol::print doesn't use it's MAI argument, we can
remove it and change all the code that prints MCSymbols to use 
<< instead, which is much simpler and cleaner.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93695 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-17 21:43:43 +00:00
Chris Lattner
6edec7b34a rename NameNeedsEscaping -> NameNeedsQuoting, eliminate the check
for first character which is a digit, mangler would have taken care
of this already.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93694 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-17 20:11:03 +00:00
Owen Anderson
a81e241fcc Convert some of the dynamic opcode lookups into static ones.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93693 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-17 19:33:27 +00:00
Chris Lattner
0bd58b0e81 stop the CBE from using Mangler::appendMangledName, which is a private function, it is mangling types, which don't matter how they are done.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93692 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-17 19:32:29 +00:00
Chris Lattner
753fb624fb fix uninit member, thanks to Benjamin Kramer for identifying the bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93691 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-17 19:24:35 +00:00
Chris Lattner
acd03ae679 Get MCSymbol out of the mangling business, and move all the logic
to Mangler.  Now MCSymbol just decides whether to slap quotes around
a symbol when printing it.

This also fixes some weirdness where two MCSymbols could be created
for the same symbol, if one needed to be mangled and got mangled to
the other one.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93690 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-17 19:23:46 +00:00
Rafael Espindola
c7aa48da3f Really fix this. I checked that on ARM I get
PASS: LLVM::FrontendC/pr5406.c (3463 of 5030)

and on X86 I get

XFAIL: LLVM::FrontendC/pr5406.c (3465 of 5030



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93689 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-17 19:20:45 +00:00
Chris Lattner
a7c65e03c4 reduce this test and convert to filecheck, hopefully the linux buildbot
will tell me something more useful.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93688 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-17 19:09:12 +00:00
Chris Lattner
ff240053bf factor this code better how that the string version of getNameWithPrefix
takes a twine.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93687 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-17 18:52:16 +00:00
Chris Lattner
c0dba723d1 now that mangler is in libtarget, it can use MCAsmInfo instead of clients
having to pass various fields from it in.  Simplify.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93686 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-17 18:22:35 +00:00
Dan Gohman
b56bf581a3 Don't create a (empty) output file, and don't warn about bitcode output
to a console, when --analyze is used.

Similarly, avoid creating an empty output file when --disable-output is used.

Print a warning when the -o option appears with either --analyze or
--disable-output, to indicate that the option is being ignored.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93685 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-17 17:47:24 +00:00
Benjamin Kramer
1efd4fd56b Switch some functions to take Twines, eliminate uses of StringExtras.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93680 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-17 07:46:39 +00:00
Owen Anderson
5b39620e2d Fix comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93679 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-17 06:49:03 +00:00
Bob Wilson
3a4a832223 The Neon "vtst" instruction takes a suffix that is the element size alone --
adding an "i" to the suffix, indicating that the elements are integers, is
accepted but not part of the standard syntax.  This helps us pass a few more
of the Neon tests from gcc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93677 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-17 06:35:17 +00:00