Commit Graph

9601 Commits

Author SHA1 Message Date
Evan Cheng
22d286b218 80 col violations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101325 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-15 01:01:55 +00:00
Devang Patel
f8a2e01fc7 Add comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101317 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-15 00:02:49 +00:00
Devang Patel
d33402629e There is no need to track compile unit offsets if there is only one compile unit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101315 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 23:56:24 +00:00
Devang Patel
7a996b2b05 Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101314 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 23:54:13 +00:00
Dan Gohman
6465265ae1 Delete unneeeded arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101276 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 20:17:22 +00:00
Dan Gohman
6a732b5a66 Delete unused arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101275 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 20:05:00 +00:00
Dan Gohman
2520864773 Factor out EH landing pad code into a separate function, and constify
a bunch of stuff to support it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101273 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 19:53:31 +00:00
Dan Gohman
7f6b8b8891 Reset the debug location even if the instruction was a terminator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101272 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 19:30:02 +00:00
Dan Gohman
11609451a5 Refine #includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101269 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 18:49:17 +00:00
Dan Gohman
fe85e76473 Pull utility routines with no SelectionDAG dependence out of
SelectionDAGBuilder. FunctionLoweringInfo isn't an ideal place for
them to live, but it's better than SelectionDAGBuilder for now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101267 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 18:31:02 +00:00
Dan Gohman
b02b62a271 Fix typos in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101266 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 18:24:06 +00:00
Dan Gohman
988099700a Delete an obsolete comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101264 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 17:40:25 +00:00
Dan Gohman
c21a2dc8df Delete an unused function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101263 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 17:22:02 +00:00
Dan Gohman
5dc44335b1 Clear the FunctionLoweringInfo object before doing other things that
don't need it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101262 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 17:13:16 +00:00
Dan Gohman
0e026729ae Move this assert out of SelectionDAGISel into FunctionLoweringInfo, and
drop the redundant #ifndef NDEBUG.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101261 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 17:11:23 +00:00
Dan Gohman
046fe6b6ba Add a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101260 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 17:09:37 +00:00
Dan Gohman
b13033f61c Move the code for initialing the entry block livein set out of
SelectionDAGISel.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101258 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 17:05:00 +00:00
Dan Gohman
c0fb65da04 Reorgnaize this code to be more tidy and readable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101256 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 17:02:07 +00:00
Dan Gohman
441516fb3d Trim #includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101255 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 16:54:39 +00:00
Dan Gohman
98708260f5 Move the code for emitting livein copies out of SelectionDAGISel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101254 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 16:51:49 +00:00
Dan Gohman
de4c0a7da7 Sink landing-pad marking code out of
SelectionDAGISel::runOnMachineFunction into FunctionLowering.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101252 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 16:32:56 +00:00
Dan Gohman
d0d8275cb2 It's not necessary to recompute EB here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101251 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 16:30:40 +00:00
Dan Gohman
32acbc1e50 Generalize this code to handle Instructions in addition to ConstantExprs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101210 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 02:33:23 +00:00
Dan Gohman
b4be71e112 Reorder the methods of this class to be a little more organized.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101206 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 02:09:45 +00:00
Devang Patel
1d526c38e2 Clear MachineInstr->MCSymbol maps at the end of a function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101202 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 01:18:28 +00:00
Evan Cheng
6327537a37 Fast path implicit_def check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101183 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 22:13:34 +00:00
Devang Patel
50d80e394d Do not include types without any definition in pubtypes list.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101171 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 20:35:04 +00:00
Evan Cheng
c15d9135a8 Avoid variable shadowing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101170 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 20:25:29 +00:00
Evan Cheng
aeb2f4aa46 Expand postra machine licm's capability a little more. If an instruction's register operands are all loop invariants, then it's safe to hoist it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101167 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 20:21:05 +00:00
Jakob Stoklund Olesen
8d17160e2c Teach MachineSinking to handle easy critical edges.
Sometimes it is desirable to sink instructions along a critical edge:

x = ...
if (a && b) ...
else use(x);

The 'a && b' condition creates a critical edge to the else block, but we still
want to sink the computation of x into the block. The else block is dominated by
the parent block, so we are not pushing instructions into new code paths.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101165 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 19:06:14 +00:00
Evan Cheng
5dc57ce533 Teach postra machine licm to hoist more obvious invariants, e.g. instructions with no source operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101154 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 18:16:00 +00:00
Dan Gohman
4183e31978 Add a few comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101148 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 17:07:06 +00:00
Dan Gohman
81bf03eb5c Eliminate MachineBasicBlock::const_livein_iterator and make
MachineBasicBlock::livein_iterator a const_iterator, because
clients shouldn't ever be using the iterator interface to
mutate the livein set.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101147 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 16:57:55 +00:00
Dan Gohman
9e9aa44d1a Rename MachineFrameInfo variables to MFI, for consistency with
the rest of CodeGen.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101146 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 16:56:45 +00:00
Dan Gohman
13e73f483e Move MachineRegisterInfo's isLiveIn and isLiveOut out of line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101145 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 16:55:37 +00:00
Dan Gohman
5c982949bf Delete an unused member variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101143 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 16:51:39 +00:00
Chris Lattner
43ac721e3b add llvm codegen support for -ffunction-sections and -fdata-sections,
patch by Sylvere Teissier!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101106 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 00:36:43 +00:00
Dan Gohman
8b3d6682a4 Remove a #include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101043 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-12 16:26:03 +00:00
Benjamin Kramer
678d9b7ed0 Plug trivial leak.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101034 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-12 11:38:35 +00:00
Evan Cheng
09010a30fd Enable post regalloc machine licm by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101023 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-12 06:25:28 +00:00
Dan Gohman
58c2587ed8 Remove unnecessary parens.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101010 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-12 02:24:01 +00:00
Bob Wilson
347fa3fa26 Tidy whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100904 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-09 21:38:26 +00:00
Devang Patel
5142471fcd Clear InsnsBeginScopeSet and InsnsEndScopeSet at the end of function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100867 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-09 16:04:20 +00:00
Dan Gohman
7d597b4428 Delete this obsolete comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100858 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-09 14:12:01 +00:00
Chandler Carruth
7b0138ffab Add a missing dependency to this library when building with CMake.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100852 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-09 05:55:25 +00:00
Bob Wilson
1793ab9e70 Use getNumImplicitDefs() and getNumImplicitUses().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100850 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-09 04:46:43 +00:00
Bob Wilson
0855cadb00 Fix up some comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100849 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-09 04:34:03 +00:00
Dan Gohman
e056781323 Add variants of ult, ule, etc. which take a uint64_t RHS, for convenience.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100824 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 23:03:40 +00:00
Chris Lattner
287df1bc03 delete a forwarding function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100815 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 21:34:17 +00:00
Chris Lattner
74aae4726a move elf section uniquing to MCContext. Along the way
merge XCore's section into MCSectionELF


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100812 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 21:26:26 +00:00
Chris Lattner
22772214de remove the TargetLoweringObjectFileMachO::getMachoSection
api and update clients to use MCContext instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100808 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 20:40:11 +00:00
Chris Lattner
f0559e4b24 move macho section uniquing from MCParser and TLOF to MCContext where
the compiler and asmparser now unique to the same sections.  This fixes
rdar://7835021.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100807 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 20:30:37 +00:00
Evan Cheng
a57fabe815 Coalescer should not delete copy instructions whose defs are partially dead. e.g.
%RDI<def,dead> = MOV64rr %RAX<kill>, %EDI<imp-def>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100804 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 20:02:37 +00:00
Ted Kremenek
d0e88f3596 Fix -Wsign-compare warning (issued by clang++).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100799 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 18:49:30 +00:00
Devang Patel
e37b0c6c25 Rename a function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100797 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 18:43:56 +00:00
Chris Lattner
d0024fec25 implicit defs get added to the end of machine instrs sometimes. Scan the whole instruction for the metadata operand instead of assuming it will be at the end of the instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100792 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 18:20:52 +00:00
Devang Patel
1c246358a0 One instruction may start (or end) multiple lexical scopes.
There is no need to remember labels identifying regions marked by such instructions in each scope.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100781 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 16:50:29 +00:00
Devang Patel
6a5975f49f Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100771 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 15:48:02 +00:00
Devang Patel
6669b81203 Delete out of date comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100769 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 15:41:13 +00:00
Devang Patel
6122a4d1c0 Refactor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100768 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 15:37:09 +00:00
Benjamin Kramer
1bd7335a17 Use twines to simplify calls to report_fatal_error. For code size and readability.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100756 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 10:44:28 +00:00
Evan Cheng
c3b0c341e7 Avoid using f64 to lower memcpy from constant string. It's cheaper to use i32 store of immediates.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100751 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 07:37:57 +00:00
Evan Cheng
4038f9c21b Make post regalloc machine licm functional. It now passes all of MultiSource.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100742 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 01:03:47 +00:00
Chris Lattner
6129c37693 convert a report_fatal_error that I was able to trigger into a nice error
so the user at least knows what inline asm is a problem.  For example:

error: inline asm not supported yet: don't know how to handle tied indirect register inputs
pr8788-1.c:14:10: note: generated from here
    asm ("\n" : "+r" (stack->regs)
         ^

Instead of:
fatal error: error in backend: Don't know how to handle tied indirect register inputs yet!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100731 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 00:09:16 +00:00
Chris Lattner
87d677c185 minor tidying.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100725 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-07 23:50:38 +00:00
Chris Lattner
35a389344d use assertions instead of unreachable for logic errors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100724 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-07 23:47:51 +00:00
Chris Lattner
38686bdffd introduce a new recoverable error handling API to LLVMContext
and use it in one place in inline asm handling stuff.  Before
we'd generate this for an invalid modifier letter:

$ clang asm.c -c -o t.o
fatal error: error in backend: Invalid operand found in inline asm: 'abc incl    ${0:Z}'
INLINEASM <es:abc incl    ${0:Z}>, 10, %EAX<def>, 2147483657, %EAX, 14, %EFLAGS<earlyclobber,def,dead>, <!-1>


Now we generate this:

$ clang asm.c -c -o t.o
error: invalid operand in inline asm: 'incl    ${0:Z}'
asm.c:3:12: note: generated from here
  __asm__ ("incl    %Z0" : "+r" (X));
           ^
1 error generated.

This is much better but still admittedly not great ("why" is the operand 
invalid??), codegen should try harder with its diagnostics :)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100723 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-07 23:40:44 +00:00
Chris Lattner
75361b69f3 rename llvm::llvm_report_error -> llvm::report_fatal_error
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100709 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-07 22:58:41 +00:00
Chris Lattner
1ca6531e2e remove some unneeded errorhandling stuff.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100703 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-07 22:44:07 +00:00
Chris Lattner
00d139064e tidy up
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100700 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-07 22:29:10 +00:00
Anton Korobeynikov
4b38debf59 Remove late ARM codegen optimization pass committed by accident.
It is not ready for public yet.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100673 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-07 18:23:27 +00:00
Anton Korobeynikov
96085a36db Initial support for different kinds of FU reservation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100645 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-07 18:19:32 +00:00
Anton Korobeynikov
1298948c5c Factor out scoreboard into separate class. This way we might have several different score boards.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100644 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-07 18:19:24 +00:00
Anton Korobeynikov
977dfcefa1 Add hook to insert late LLVM=>LLVM passes just before isel
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100640 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-07 18:18:42 +00:00
Chris Lattner
7f893c0712 fix 80 col violation, patch by Alastair Lynn
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100639 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-07 18:13:33 +00:00
Chris Lattner
c0561f29a8 add a comment line that got dropped
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100638 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-07 18:10:38 +00:00
Chris Lattner
24ad3ed71f fix a latent bug my inline asm stuff exposed:
MachineOperand::isIdenticalTo wasn't handling metadata operands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100636 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-07 18:03:19 +00:00
Benjamin Kramer
96fbb3eea6 Remove unused method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100620 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-07 11:23:46 +00:00
Torok Edwin
9c4210794e Workaround the breakage in r100616 by guarding all timers with
TimePassesIsEnabled. This should allow make check to pass.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100618 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-07 10:44:46 +00:00
Bill Wendling
5f017e8086 Use the "NamedGroupTimer" class to categorize DWARF emission better.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100616 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-07 09:28:04 +00:00
Benjamin Kramer
a592e671ee Use raw_ostream.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100615 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-07 09:26:51 +00:00
Evan Cheng
5b463905be Add comments for missed opportunities.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100610 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-07 06:00:33 +00:00
Evan Cheng
348856e56a Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100609 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-07 05:59:12 +00:00
Chris Lattner
cf9a415182 Have the inst emitter add the !srcloc mdnode to the machine instr.
Have the asmprinter use the mdnode to scavenge a source location if
present.  Document this nonsense in langref.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100607 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-07 05:38:05 +00:00
Chris Lattner
fee455ea6a remove another magic number.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100606 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-07 05:27:36 +00:00
Chris Lattner
decc267151 Three changes:
1. Introduce some enums and accessors in the InlineAsm class
   that eliminate a ton of magic numbers when handling inline
   asm SDNode.
2. Add a new MDNodeSDNode selection dag node type that holds
   a MDNode (shocking!)
3. Add a new argument to ISD::INLINEASM nodes that hold !srcloc
   metadata, propagating it to the instruction emitter, which
   drops it.

No functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100605 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-07 05:20:54 +00:00
Dale Johannesen
343b42e428 Move printing of target-indepedent DEBUG_VALUE comments
into AsmPrinter.  Target-dependent form is still generated
by FastISel and still handled in X86 code.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100596 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-07 01:15:14 +00:00
Evan Cheng
d94671a25e Post regalloc LICM. Work in progress.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100592 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-07 00:41:17 +00:00
Devang Patel
5f0940002a Do not emit specification DIE with DW_AT_specification attribute for member functions of a funcation local class. This trips gdb's partial scan of DIEs at load time. Fixes Radar 7833483.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100586 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-06 23:53:48 +00:00
John McCall
795ee9dd1e Fix a number of clang -Wsign-compare warnings that didn't have an obvious
solution.  The only reason these don't fire with gcc-4.2 is that gcc turns off
part of -Wsign-compare in C++ on accident.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100581 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-06 23:35:53 +00:00
Dale Johannesen
49d915bb9a Revert 100573, it's causing some testsuite problems.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100578 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-06 22:45:26 +00:00
Dale Johannesen
0a580d30e0 Move printing of DEBUG_VALUE comments to target-independent place.
There is probably a more elegant way to do this.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100573 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-06 22:21:07 +00:00
Dale Johannesen
c4d7b14a92 Allow for the possibility that a debug-value points
to a SDNode that didn't have code generated for it.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100566 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-06 21:59:56 +00:00
Stuart Hastings
639336e0bd Reverting 100530 & 100531 due to regressions in the GDB test suite.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100563 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-06 21:38:29 +00:00
Evan Cheng
98116f99b6 Code clean up. Move includes from VirtRegRewriter.h to VirtRegRewriter.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100532 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-06 17:19:55 +00:00
Stuart Hastings
983327b351 Revise debug info machinery to digest nested functions and classes.
A certain GDB testsuite case (local.cc) has a function nested inside a
class nested inside another function.  GCC presents the innermost
function to llvm-convert first.  Heretofore, the debug info mistakenly
placed the inner function at module scope.  This patch walks the GCC
context links and instantiates the outer class and function so the
debug info is properly nested.  Radar 7426545.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100530 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-06 17:19:32 +00:00
Mon P Wang
01f0e8561d Remove assert to treat memmove and memset like memcpy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100521 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-06 08:27:51 +00:00
Chris Lattner
885d94143d propagate cookie management out one layer of function calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100510 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-06 00:58:50 +00:00
Chris Lattner
6eb7806a5f report errors through LLVMContext's inline asm handler if available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100509 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-06 00:55:39 +00:00
Chris Lattner
421ccd9892 Give MachineModuleInfo an actual Module*.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100508 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-06 00:51:52 +00:00