Commit Graph

411 Commits

Author SHA1 Message Date
Chris Lattner
84e679beea rename NewDebugLoc -> DebugLoc, prune #includes in DebugLoc.h.
This keeps around temporary typedef for clang/llvm-gcc so the
build won't break when I commit this :)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100218 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-02 20:21:22 +00:00
Chris Lattner
c7f3ace20c use DebugLoc default ctor instead of DebugLoc::getUnknownLoc()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100214 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-02 20:16:16 +00:00
Chris Lattner
de4845c163 Switch the code generator (except the JIT) onto the new DebugLoc
representation.  This eliminates the 'DILocation' MDNodes for 
file/line/col tuples from -O0 -g codegen.

This remove the old DebugLoc class, making it a typedef for DebugLoc,
I'll rename NewDebugLoc next.

I didn't update the JIT to use the new apis, so it will continue to
work, but be as slow as before.  Someone should eventually do this
or, better yet, rip out the JIT debug info stuff and build the JIT
on top of MC.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100209 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-02 19:42:39 +00:00
Dale Johannesen
93d6a7e9c2 Teach AnalyzeBranch, RemoveBranch and the branch
folder to be tolerant of debug info following the
branch(es) at the end of a block.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100168 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-02 01:38:09 +00:00
Benjamin Kramer
32e6518de3 XFAIL some PIC16 tests when running under valgrind-leaks. I don't expect these
to be fixed any time soon.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99888 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-30 14:34:13 +00:00
Benjamin Kramer
91b1d8fdbf PIC16: Plug a leak in PIC16Section by allocating name & address strings in the
MCContext. There is still one leak left in PIC16Section (the Items vector).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99887 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-30 13:28:42 +00:00
Benjamin Kramer
dd70cea00c PIC16: Simplify code by using a std::set<std::string> instead of a sorted & uniqued std::list of leaked char*.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99061 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-20 17:41:18 +00:00
Benjamin Kramer
e5636a3221 Initialize Size member to appease valgrind.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98763 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-17 19:55:31 +00:00
Chris Lattner
1b2eb0e8a6 eliminate the now-unneeded context argument of MBB::getSymbol()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98451 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-13 21:04:28 +00:00
Chris Lattner
11d53c129f rearrange MCContext ownership. Before LLVMTargetMachine created it
and passing off ownership to AsmPrinter.  Now MachineModuleInfo
creates it and owns it by value.  This allows us to use MCSymbols
more consistently throughout the rest of the code generator, and
simplifies a bit of code.  This also allows MachineFunction to 
keep an MCContext reference handy, and cleans up the TargetRegistry
interfaces for AsmPrinters.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98450 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-13 20:55:24 +00:00
Jeffrey Yasskin
150ae11976 Fix LLVM build when the user specifies CPPFLAGS on the make command line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98394 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-12 21:42:14 +00:00
Chris Lattner
d62f1b4168 inline GetGlobalValueSymbol into the rest its callers and
remove it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98390 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-12 21:19:23 +00:00
Jim Grosbach
dff4b4c5a7 Change the Value argument to eliminateFrameIndex to a type-tagged value. This
is preparatory to having PEI's scavenged frame index value reuse logic
properly distinguish types of frame values (e.g., whether the value is
stack-pointer relative or frame-pointer relative).

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98086 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-09 21:45:49 +00:00
Devang Patel
3c91b05d2b Avoid using DIDescriptor.isNull().
This is a first step towards eliminating checks in Descriptor constructors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97975 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-08 20:52:55 +00:00
Devang Patel
0ef3fa6aab Revert r97947.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97963 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-08 19:20:38 +00:00
Devang Patel
d8cc5d5256 Avoid using DIDescriptor.isNull().
This is a first step towards eliminating unncessary constructor checks in light weight DIDescriptor wrappers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97947 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-08 18:25:48 +00:00
John McCall
992e61992c Teach the pic16 target to recognize pic16-*-* triples.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97691 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-04 00:21:47 +00:00
Chris Lattner
7c306da505 Sink InstructionSelect() out of each target into SDISel, and rename it
DoInstructionSelection.  Inline "SelectRoot" into it from DAGISelHeader.
Sink some other stuff out of DAGISelHeader into SDISel.

Eliminate the various 'Indent' stuff from various targets, which dates
to when isel was recursive.

 17 files changed, 114 insertions(+), 430 deletions(-)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97555 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-02 06:34:30 +00:00
Bill Wendling
46ada19645 Remove dead parameter passing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97536 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-02 01:55:18 +00:00
Sanjiv Gupta
20c51be30c The cloner has nothing to do if any of the main or ISR entrypoints are not
present in the module.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97232 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-26 18:32:18 +00:00
Sanjiv Gupta
2b0070211e Reapply things reverted back in 97220, with the fixed test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97228 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-26 17:59:28 +00:00
Chandler Carruth
727cf62123 Revert r97211 and r97213 to get the build green again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97220 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-26 08:43:09 +00:00
Sanjiv Gupta
651d85c2f2 Currently in LLVM, names of libcalls are assigned during TargetLowering
object construction. There is no provision to change them when the 
code for a function generated. 
So we have to change these names while printing assembly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97213 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-26 07:31:15 +00:00
Sanjiv Gupta
917733eca0 Before converting an operand to mem, check if it is legal to do so.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97211 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-26 07:27:35 +00:00
Sanjiv Gupta
e6ba0b5762 Each field of auxiliary debug entry is only 1 byte long.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97108 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-25 03:54:49 +00:00
Chris Lattner
54de8c1b39 remove dupes now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96811 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-22 22:15:05 +00:00
Chris Lattner
bebe68ec00 move #includes earlier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96810 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-22 22:14:47 +00:00
Sanjiv Gupta
7310fe4a69 Remap the call sites of a shared function in interrupt line functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96591 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-18 18:00:35 +00:00
Sanjiv Gupta
d6d9fb503d Re-factoring.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96589 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-18 17:32:25 +00:00
Sanjiv Gupta
94c3ddbcc6 Added routine to clone the body of a function and maintain a map of already
cloned functions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96485 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-17 18:11:29 +00:00
Sanjiv Gupta
139eda6054 Added a function to clone locals of a function.( which for pic16 are globals
with mangled names).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96465 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-17 06:48:50 +00:00
Sanjiv Gupta
11979aa23e Removed header files from .h by adding forward decls.
Renamed PIC16FrameOverlay namespace to PIC16OVERLAY.
Renamed PIC16FrameOverlay class to PIC16Overlay.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96463 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-17 06:46:23 +00:00
Sanjiv Gupta
e74c3bae3a Initial implementation of PIC16 Cloner pass.
This pass is supposed to be run on the linked .bc module.
It traveses the module call graph twice. Once starting from the main function
and marking each reached function as "ML". Again, starting from the ISR
and cloning any reachable function that was marked as "ML". After cloning
the function, it remaps all the call sites in IL functions to call the
cloned functions. 

Currently only marking is being done.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96435 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-17 01:11:53 +00:00
Sanjiv Gupta
7643ca5c2b The code section for an ISR has a specific address.
Currently, whether a function is ISR or not is encoded in the section attribute for that function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96322 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-16 03:41:07 +00:00
Evan Cheng
014bf215c3 Split SelectionDAGISel::IsLegalAndProfitableToFold to
IsLegalToFold and IsProfitableToFold. The generic version of the later simply checks whether the folding candidate has a single use.

This allows the target isel routines more flexibility in deciding whether folding makes sense. The specific case we are interested in is folding constant pool loads with multiple uses.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96255 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-15 19:41:07 +00:00
David Greene
74a6a7990c Remove an assumption of default arguments. This is in anticipation of a
change to SelectionDAG build APIs.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96235 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-15 16:56:34 +00:00
Sanjiv Gupta
44de6823fc fixes to pagesel/banksel inserter.
1. restore these across direct/indirect calls.
2. restore pagesel for any macros with gotos.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96175 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-14 18:27:42 +00:00
Dan Gohman
f451cb870e Fix "the the" and similar typos.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95781 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-10 16:03:48 +00:00
Chris Lattner
8e089a9e4d print all the newlines at the end of instructions with
OutStreamer.AddBlankLine instead of textually.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95734 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-10 00:36:00 +00:00
Chris Lattner
99d806186e rename printMachineInstruction -> EmitInstruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95184 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-03 01:41:03 +00:00
Evan Cheng
022d9e1cef Revert 95130.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95160 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 23:55:14 +00:00
Chris Lattner
56591ab218 refactor code so that LLVMTargetMachine creates the asmstreamer and
mccontext instead of having AsmPrinter do it.  This allows other 
types of MCStreamer's to be passed in.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95155 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 23:37:42 +00:00
Evan Cheng
942619695f Pass callsite return type to TargetLowering::LowerCall and use that to check sibcall eligibility.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95130 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 21:29:10 +00:00
Benjamin Kramer
12ea66a727 Replace strcpy with memcpy when we have the length around anyway.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94746 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-28 18:04:38 +00:00
Evan Cheng
0c439eb2c8 Eliminate target hook IsEligibleForTailCallOptimization.
Target independent isel should always pass along the "tail call" property. Change
target hook LowerCall's parameter "isTailCall" into a refernce. If the target
decides it's impossible to honor the tail call request, it should set isTailCall
to false to make target independent isel happy.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94626 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-27 00:07:07 +00:00
Chris Lattner
cee63322ea Eliminate SetDirective, and replace it with HasSetDirective.
Default HasSetDirective to true, since most targets have it.

The targets that claim to not have it probably do, or it is
spelled differently. These include Blackfin, Mips, Alpha, and
PIC16.  All of these except pic16 are normal ELF targets, so
they almost certainly have it.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94585 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 20:40:54 +00:00
Chris Lattner
f71cb015c1 add a new MachineBasicBlock::getSymbol method, replacing
the AsmPrinter::GetMBBSymbol.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94515 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 04:55:51 +00:00
Chris Lattner
1e459c4467 don't bother setting the AsmPrinter::MF ivar, now that
AsmPrinter::SetupMachineFunction sets it.  Note that systemz
and msp430 didn't.  Yay for reduced inconsistency! :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94510 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 04:38:11 +00:00
Chris Lattner
43b5f9312d make -fno-rtti the default unless a directory builds with REQUIRES_RTTI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94378 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-24 20:43:08 +00:00
Chris Lattner
e73a31f667 Stop building RTTI information for *most* llvm libraries. Notable
missing ones are libsupport, libsystem and libvmcore.  libvmcore is
currently blocked on bugpoint, which uses EH.  Once it stops using
EH, we can switch it off.

This #if 0's out 3 unit tests, because gtest requires RTTI information.
Suggestions welcome on how to fix this.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94164 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 06:49:46 +00:00