Commit Graph

56371 Commits

Author SHA1 Message Date
Devang Patel
42aafd7e57 If a instruction belongs to another function (and not current function) as per debug info attached with the instruction then ignore the dangling lexical scope of this instruction. Such scopes are unreachable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93967 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-20 02:05:23 +00:00
David Greene
221925ecca Add some asserts to check SelectionDAG problems earlier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93960 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-20 00:59:23 +00:00
Daniel Dunbar
6b8dfed15e For 'install-clang' target, also traverse tools/clang/lib/Runtime.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93958 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-20 00:43:07 +00:00
Dale Johannesen
918f0f0bea Move findDebugLoc somewhere more central. Fix
more cases where debug declarations affect
debug line info.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93953 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-20 00:19:24 +00:00
Dan Gohman
cd9e155755 Fold (add x, shl(0 - y, n)) -> sub(x, shl(y, n)), to simplify some code
that SCEVExpander can produce when running on behalf of LSR.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93949 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 23:30:49 +00:00
Bob Wilson
cb9a6aab02 Wrap some comments to 80 columns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93940 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 22:56:26 +00:00
Dan Gohman
2b98bd23cb Make SCEVAddRecExpr's getType return a pointer type when the add
has a pointer member. This helps reduce unnecessary bitcasting
and uglygeps.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93939 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 22:53:50 +00:00
Dale Johannesen
bbe2bbeac8 Fix a case where debug_value was perturbing the
line number info.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93937 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 22:50:05 +00:00
Dan Gohman
d8d0b6a42c When doing address-mode sinking, expand the base register first, rather
than the scaled register. This makes it more likely that subsequent
AddrModeMatcher queries will match the new address the same way as the
old, instead of accidentally matching what had been the base register
as the new scaled register, and then failing to match the scaled register.
This fixes some problems with address-mode sinking multiple muls into a
block, which will be a lot more common with some upcoming
LoopStrengthReduction changes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93935 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 22:45:06 +00:00
Chris Lattner
c7b8814bb4 give MCAsmInfo a 'has little endian' bit. This is unfortunate, but
I really want clients of the streamer to be able to say "emit this
64-bit integer" and have it get broken down right by the streamer.

I may change this in the future, we'll see how it works out.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93934 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 22:42:28 +00:00
Dan Gohman
6784753814 Add a comment and tidy up some whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93932 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 22:27:22 +00:00
Dan Gohman
3abf905b50 Fix a typo and an 80-column violation in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93931 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 22:26:02 +00:00
Dan Gohman
1cd9275c8d Give ScalarEvolution access to the DominatorTree. It'll need this
to make more intellegent AddRec folding decisions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93930 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 22:21:27 +00:00
Chris Lattner
09ce674ce8 simplify the rest of fp constant printing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93929 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 22:16:33 +00:00
Chris Lattner
72b5ebc6be simplify the code for printing x86 long double, don't do work
for -fverbose-asm unless it's on.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93926 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 22:11:05 +00:00
Jakob Stoklund Olesen
b1bb4afbc7 Identify predicate and optional-def operands when printing machine
instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93925 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 22:08:34 +00:00
Chris Lattner
32ae3fe0ba add a new EmitIntValue method that MCStreamer impls can optionally define
and that clients can use.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93923 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 22:03:38 +00:00
Dan Gohman
bafbbdde38 Add a new helper function to IVUsers for returning the "canonical"
form of an expression. This is the expression without the
post-increment adjustment made, which is useful in determining
which registers will be used by the expansion.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93921 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 21:55:32 +00:00
Dan Gohman
8e1aa8edec Add nounwinds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93919 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 21:51:51 +00:00
Chris Lattner
6449abfbc8 eliminate AsmPrinter::EmitZeros: just use MCStreamer directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93918 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 21:51:22 +00:00
Sean Callanan
18b8323de7 Promoted the getTok() method to MCAsmParser so that
the two token accessor functions are declared consistently.
Modified the clients of MCAsmParser to reflect this change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93916 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 21:44:56 +00:00
Xerxes Ranby
1c8183df7f Stubs for getHostCPUFeatures API. This implements part of PR5389.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93913 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 21:26:05 +00:00
Jakob Stoklund Olesen
35f0febcb6 Remove predicates when changing an add into an unpredicable mov.
Since the mov is executed unconditionally, make sure that the add didn't have
any predicate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93909 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 21:08:28 +00:00
Benjamin Kramer
dcff928b59 Update CMake list.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93905 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 20:59:04 +00:00
David Greene
ce6715faa3 Add some new debugging APIs to print out "raw" SelectionDAGs to make
understanding CannotYTetSelect and other errors easier.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93901 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 20:37:34 +00:00
Sean Callanan
b9a25b7744 Propagated the parser-side Lex function's declaration to
MCAsmParser, and changed the target-specific AsmParsers
to use it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93900 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 20:27:46 +00:00
Sean Callanan
79ed1a8734 Added a Lex function to the AsmParser, to allow handling
of include directives to occur within the parser itself.
This will break the lexer's dependency on a SourceMgr as
input.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93899 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 20:22:31 +00:00
Bruno Cardoso Lopes
8c5ee7147b Fix a bug introduced on r92564 where the name "Node" was already
in use by Mips.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93897 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 19:57:07 +00:00
Chris Lattner
aaec205b87 Generalize mcasmstreamer data emission APIs to take an address space
identifier.  There is no way to work around it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93896 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 19:46:13 +00:00
Evan Cheng
590d16be6f Do not extend extension results beyond the use of a PHI instruction at the start of a use block. A PHI use is expected to kill its source values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93895 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 19:45:51 +00:00
Chris Lattner
91093ecf0f refactor code to be static functions instead of methods on AsmPrinter.
This fixes some bugs handling address spaces.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93891 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 19:10:44 +00:00
Chris Lattner
8a6d7ac88f mcstreamerize AsmPrinter::EmitZeros, at least when emitting to the
default address space.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93890 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 18:58:52 +00:00
Chris Lattner
6113b3d323 add an MCAsmStreamer::EmitFill specialization of EmitFill that
emits one directive instead of N.  Not doing this would be a
significant regression on the # bytes generated by .fill.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93889 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 18:52:28 +00:00
Chris Lattner
ddf6bdde44 add a "MCStreamer::EmitFill" method, and move the default implementation
(which just iteratively emits bytes) to MCStreamer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93888 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 18:45:47 +00:00
Chris Lattner
f03ffd13f8 remove MAI::ZeroDirectiveSuffix, which is only used by MASM,
which we don't support anymore.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93886 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 18:37:01 +00:00
Jim Grosbach
e45ab8a0a9 For aligned load/store instructions, it's only required to know whether a
function can support dynamic stack realignment. That's a much easier question
to answer at instruction selection stage than whether the function actually
will have dynamic alignment prologue. This allows the removal of the
stack alignment heuristic pass, and improves code quality for cases where
the heuristic would result in dynamic alignment code being generated when
it was not strictly necessary.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93885 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 18:31:11 +00:00
Chris Lattner
c0404b3715 optimize ~(~X >>s Y) --> (X >>s Y), patch by Edmund Grimley
Evans!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93884 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 18:16:19 +00:00
Bruno Cardoso Lopes
9201b10daa On pic function calls some arguments were marked dead and
the instruction to load those args removed. This fix PR6071


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93880 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 17:00:43 +00:00
Bob Wilson
ce8febefa5 The change in r90189 adds a link in a directory outside the iPhone platform
directory when building the llvmCore_Embedded project.  Fix this by putting
the iPhone platform directory into DEST_DIR instead of DEST_ROOT.  I also
noticed what appears to be an unintentional use of DEVELOPER_BIN instead of
DEVELOPER_DIR, so I fixed that and changed to use DEVELOPER_DIR in some places
that were hardcoded to "Developer".  Finally, the other changes here allowed
some refactoring and simplification, which I have done.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93878 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 16:42:10 +00:00
Bruno Cardoso Lopes
ea98278935 load f64 +0.0 in a cleaner way. This fix part of PR5445
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93876 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 12:53:04 +00:00
Bruno Cardoso Lopes
e5ebd5f2ae Fix return registers for mips eabi
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93875 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 12:37:35 +00:00
Chris Lattner
4c8c668b57 mcstreamer'ize the rest of EmitGlobalVariable that is used on
darwin.  The next big piece to get global variables streamerized
is EmitGlobalConstant.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93870 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 06:41:24 +00:00
Chris Lattner
41aa25a433 don't let asm-verbose break the check-next lines in these tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93869 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 06:39:54 +00:00
Chris Lattner
814819f6ea stop using the .lcomm pseudoop on darwin, instead, directly use the
.zerofill directive.  Streamerize its generation.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93868 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 06:25:51 +00:00
Chris Lattner
258281d8ac fix parsing .comm directives on systems which do not represent alignments
as a power of 2.  This fixes MC/AsmParser/directive_comm.s


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93867 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 06:22:22 +00:00
Chris Lattner
f4d9a555ba only darwin has zerofill
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93866 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 06:21:23 +00:00
Devang Patel
622b02601b MDNodes are not expected to disappear or replaced by another MDNode, so there is no need to pay the cost of WeakVH and ValueMaps.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93865 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 06:19:05 +00:00
Devang Patel
c99fd879c0 Avoid including DebugInfo.h in AsmPrinter.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93864 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 06:09:04 +00:00
Chris Lattner
8ad9a77501 zap the ARM version of PrintGlobalVariable, which I missed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93863 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 06:08:15 +00:00
Chris Lattner
4ed5438f48 mc'ize some stuff, don't comment out .lcomm directive in -fverbose-asm mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93860 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 06:01:04 +00:00