1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-23 13:02:52 +02:00
Commit Graph

405 Commits

Author SHA1 Message Date
Sanjiv Gupta
239a8992f6 Fixed more problems caused by 78142.
Passing of indirect arguments starts after return value on the callee's frame.

llvm-svn: 78635
2009-08-11 01:51:55 +00:00
Owen Anderson
b4bce99769 Rename MVT to EVT, in preparation for splitting SimpleValueType out into its own struct type.
llvm-svn: 78610
2009-08-10 22:56:29 +00:00
Devang Patel
d56797d16f Do not rely on magic "llvm.dbg.*" global variable name to find debug info.
PIC16 developers, please verify. 

llvm-svn: 78603
2009-08-10 22:11:20 +00:00
Owen Anderson
dcb47bda67 Start moving TargetLowering away from using full MVTs and towards SimpleValueType, which will simplify the privatization of IntegerType in the future.
llvm-svn: 78584
2009-08-10 18:56:59 +00:00
Chris Lattner
7ee4b3a2c0 fix some warnings for the MSVC build, by Yonggang Luo!
llvm-svn: 78571
2009-08-10 17:35:42 +00:00
Chris Lattner
9e2c3aa666 sink the 'name' and 'isdirective' state out of MCSection into its derived classes.
This totally optimizes PIC16 sections by not having an 'isdirective' bit anymore!! ;-)

llvm-svn: 78517
2009-08-08 23:39:42 +00:00
Chris Lattner
2849883bd5 1. Make MCSection an abstract class.
2. Move section switch printing to MCSection virtual method which takes a
   TAI.  This eliminates textual formatting stuff from TLOF.
3. Eliminate SwitchToSectionDirective, getSectionFlagsAsString, and 
   TLOFELF::AtIsCommentChar.

llvm-svn: 78510
2009-08-08 22:41:53 +00:00
Chris Lattner
8329a281b2 add new PIC16Section class, this time hopefully not breaking the build :)
llvm-svn: 78505
2009-08-08 21:37:01 +00:00
Daniel Dunbar
e5e5b0a1bd Revert r78501, it doesn't build.
--- Reverse-merging r78501 into '.':
U    lib/Target/PIC16/PIC16TargetObjectFile.cpp
D    lib/Target/PIC16/PIC16Section.h

llvm-svn: 78503
2009-08-08 21:12:40 +00:00
Chris Lattner
a9f2648ef6 make PIC16 create its own custom MCSection.
llvm-svn: 78501
2009-08-08 20:55:25 +00:00
Chris Lattner
0dabef30f5 give pic16 a target-specific section creation name too
llvm-svn: 78496
2009-08-08 20:23:47 +00:00
Chris Lattner
637296415e sink getOrCreateSection down into all the object file implementations,
now that they create *all* the sections.

llvm-svn: 78494
2009-08-08 20:14:13 +00:00
Chris Lattner
7bf6e40552 make printInstruction return void since its result is omitted. Make the
error condition get trapped with an assert.

llvm-svn: 78449
2009-08-08 01:32:19 +00:00
Sanjiv Gupta
35b980d8ba Minor fixes to avoid using invalid debugloc.
llvm-svn: 78383
2009-08-07 11:00:02 +00:00
Benjamin Kramer
02c9c67820 Simplify code and avoid allocations.
llvm-svn: 78382
2009-08-07 10:42:28 +00:00
Sanjiv Gupta
1738d18060 Run memsel inserter just before emit assembly to avoid tinkering by other passes.
llvm-svn: 78369
2009-08-07 05:44:27 +00:00
Devang Patel
157f0b79c8 Use DebugInfoFinder
llvm-svn: 78334
2009-08-06 20:53:24 +00:00
Chris Lattner
2d90fbe8be Fix several fixmes and clean up code by sinking *all* section
creation activity into the target-specific subclasses of TLOF.
Before this, globals with explicit sections could be created by
the base class.

1. make getOrCreateSection protected, add a new getExplicitSectionGlobal
   pure virtual method to assign sections to globals with a specified
   section.
2. eliminate getSpecialCasedSectionGlobals, which is now PIC specific.
3. eliminate the getKindForNamedSection virtual method, which is
   now just a static method for ELF.
4. Add implementions of getExplicitSectionGlobal for ELF/PECOFF/Darwin/PIC16.
   They are now all detangled and understandable, woo! :)

llvm-svn: 78319
2009-08-06 16:39:58 +00:00
Chris Lattner
affa6e37ef go through PIC16TargetObjectFile to make sections instead of
creating them directly in the pic16 asmprinter.

llvm-svn: 78317
2009-08-06 16:27:28 +00:00
Dan Gohman
dda3c89020 Fix a bug in the PIC16 backend.
llvm-svn: 78211
2009-08-05 16:46:43 +00:00
Dan Gohman
5d566d918b Major calling convention code refactoring.
Instead of awkwardly encoding calling-convention information with ISD::CALL,
ISD::FORMAL_ARGUMENTS, ISD::RET, and ISD::ARG_FLAGS nodes, TargetLowering
provides three virtual functions for targets to override:
LowerFormalArguments, LowerCall, and LowerRet, which replace the custom
lowering done on the special nodes. They provide the same information, but
in a more immediately usable format.

This also reworks much of the target-independent tail call logic. The
decision of whether or not to perform a tail call is now cleanly split
between target-independent portions, and the target dependent portion
in IsEligibleForTailCallOptimization.

This also synchronizes all in-tree targets, to help enable future
refactoring and feature work.

llvm-svn: 78142
2009-08-05 01:29:28 +00:00
Sanjiv Gupta
f1726f1105 Legalize i64 store operations generated by inst-combine.
llvm-svn: 78082
2009-08-04 17:59:16 +00:00
Daniel Dunbar
d5d4cfa604 Avoid compiler warning (in -Asserts mode)
llvm-svn: 78070
2009-08-04 16:46:12 +00:00
Daniel Dunbar
9e079eec0c Move most targets TargetMachine constructor to only taking a target triple.
- The C, C++, MSIL, and Mips backends still need the module.

llvm-svn: 77927
2009-08-02 23:37:13 +00:00
Daniel Dunbar
0b82c938fe Normalize Subtarget constructors to take a target triple string instead of
Module*.

Also, dropped uses of TargetMachine where unnecessary. The only target which
still takes a TargetMachine& is Mips, I would appreciate it if someone would
normalize this to match other targets.

llvm-svn: 77918
2009-08-02 22:11:08 +00:00
Chris Lattner
347434dfea PIC16 TAI doesn't need TM
llvm-svn: 77867
2009-08-02 04:41:14 +00:00
Chris Lattner
b5ceb50677 remove TargetAsmInfo::TM, which is now dead. The basic TAI class now
no longer depends on TM!

llvm-svn: 77863
2009-08-02 04:27:24 +00:00
Daniel Dunbar
59c4432b7f Fix a possible crash on delete of an uninitialized variable.
llvm-svn: 77846
2009-08-02 01:25:15 +00:00
Dan Gohman
15699ece5b Don't call SectionForGlobal for hasAvailableExternallyLinkage()
variables either.

llvm-svn: 77844
2009-08-02 01:18:44 +00:00
Chris Lattner
18e3729e50 don't call SectionForGlobal on declarations, you can't tell the section a
declaration will end up in.

llvm-svn: 77843
2009-08-02 01:02:43 +00:00
Chris Lattner
506b49ffa0 Make SectionKind::get() private.
llvm-svn: 77835
2009-08-02 00:02:44 +00:00
Chris Lattner
0106f7031b fix a fixme by sinking various target-specific directives down into
the appropriate subclasses.

llvm-svn: 77815
2009-08-01 21:56:13 +00:00
Chris Lattner
2a9d51b703 it turns out that isWeak() was basically dead anyway. Kill off SectionInfo :-/
llvm-svn: 77812
2009-08-01 21:46:23 +00:00
Chris Lattner
79e9585304 Change SectionKind to be a property that is true of a *section*, it
should have no state that is specific to particular globals in the
section.  In this case, it means the removal of the "isWeak" and
"ExplicitSection" bits.  MCSection uses the new form of SectionKind.

To handle isWeak, I introduced a new SectionInfo class, which is
SectionKind + isWeak, and it is used by the part of the code generator
that does classification of a specific global.

The ExplicitSection disappears.  It is moved onto MCSection as a new
"IsDirective" bit.  Since the Name of a section is either a section
or directive, it makes sense to keep this bit in MCSection.  Ultimately
the creator of MCSection should canonicalize (e.g.) .text to whatever
the actual section is.

llvm-svn: 77803
2009-08-01 21:11:14 +00:00
Chris Lattner
75b7692e66 switch off of 'Section' onto MCSection. We're not properly using
MCSection subclasses yet, but this is a step in the right direction.

llvm-svn: 77708
2009-07-31 18:48:30 +00:00
Sanjiv Gupta
059b94e803 define target names for std libcalls.
llvm-svn: 77667
2009-07-31 07:35:57 +00:00
Sanjiv Gupta
6692c2401b Keep track of references to mem(cpy,move,set) and then print only one extern
declaration for them.

llvm-svn: 77578
2009-07-30 04:15:15 +00:00
Owen Anderson
881d928f9b Move types back to the 2.5 API.
llvm-svn: 77516
2009-07-29 22:17:13 +00:00
Chris Lattner
5c3e1e0d0c pass the mangler down into the various SectionForGlobal methods.
No functionality change.

llvm-svn: 77432
2009-07-29 05:09:30 +00:00
Chris Lattner
ec951ca82f fix a casting problem on the llvm-x86_64-linux tester
llvm-svn: 77295
2009-07-28 03:20:34 +00:00
Chris Lattner
55461787cc Rip all of the global variable lowering logic out of TargetAsmInfo. Since
it is highly specific to the object file that will be generated in the end,
this introduces a new TargetLoweringObjectFile interface that is implemented
for each of ELF/MachO/COFF/Alpha/PIC16 and XCore.

Though still is still a brutal and ugly refactoring, this is a major step
towards goodness.

This patch also:
1. fixes a bunch of dangling pointer problems in the PIC16 backend.
2. disables the TargetLowering copy ctor which PIC16 was accidentally using.
3. gets us closer to xcore having its own crazy target section flags and
   pic16 not having to shadow sections with its own objects.
4. fixes wierdness where ELF targets would set CStringSection but not
   CStringSection_.  Factor the code better.
5. fixes some bugs in string lowering on ELF targets.

llvm-svn: 77294
2009-07-28 03:13:23 +00:00
Chris Lattner
2aed301c12 don't copy TargetLowering.
llvm-svn: 77293
2009-07-28 03:05:40 +00:00
Sanjiv Gupta
aec8e8ce73 Remove duplicate entries while printing decls for external symbols.
Some libcall names are same, so they were getting printed twice.

llvm-svn: 77215
2009-07-27 18:04:34 +00:00
Chris Lattner
cd7d963b75 Eliminate getNamed/getUnnamedSection, adding a new and unified getOrCreateSection
instead.

llvm-svn: 77186
2009-07-27 06:17:14 +00:00
Chris Lattner
a2b00bdd7a Eliminate SectionFlags, just embed a SectionKind into Section
instead and drive things based off of that.

llvm-svn: 77184
2009-07-27 05:32:16 +00:00
Sanjiv Gupta
efd89b69e1 Generate a libcall for i8 multiply.
llvm-svn: 77179
2009-07-27 02:44:46 +00:00
Sanjiv Gupta
c1b29cb551 fixed incorrect lowering of ISD::SUB node. SUB has only one result value.
It wasn't caught during tests because we never got a sub generated, (i8 was always getting promoted to int, which in turn was broken into subc/sube). Though the optimizer leaves an i8 sub now. 

llvm-svn: 77178
2009-07-27 02:26:06 +00:00
Chris Lattner
12e2f1ca42 reduce indentation
llvm-svn: 77161
2009-07-26 18:08:15 +00:00
Sanjiv Gupta
cc8eb579b9 Fix the breakage caused by 76950.
PIC16 has special naming conventions for variables having section names specified via section attribute.

llvm-svn: 77153
2009-07-26 10:25:01 +00:00
Daniel Dunbar
a7a01acc7c Factor commonality in triple match routines into helper template for registering
classes, and migrate existing targets over.

llvm-svn: 77126
2009-07-26 05:03:33 +00:00
Daniel Dunbar
49987490c2 Kill Target specific ModuleMatchQuality stuff.
- This was overkill and inconsistently implemented.

llvm-svn: 77114
2009-07-26 02:22:58 +00:00
Chris Lattner
fda0ca90c1 make SectionKind be a first-class pod struct instead of just
an enum.

llvm-svn: 77096
2009-07-25 23:21:55 +00:00
Chris Lattner
15b3d2039f this is (unfortunately) several changes mixed together:
1. Spell SectionFlags::Writeable as "Writable".
2. Add predicates for deriving SectionFlags from SectionKinds.
3. Sink ELF-specific getSectionPrefixForUniqueGlobal impl into
   ELFTargetAsmInfo.
4. Fix SectionFlagsForGlobal to know that BSS/ThreadBSS has the
   BSS bit set (the real fix for PR4619).
5. Fix isSuitableForBSS to not put globals with explicit sections
   set in BSS (which was the reason #4 wasn't fixed earlier).
6. Remove my previous hack for PR4619.

llvm-svn: 77085
2009-07-25 18:57:34 +00:00
Daniel Dunbar
d699ffc2ac Simplify JIT target selection.
- Instead of requiring targets to define a JIT quality match function, we just
   have them specify if they support a JIT.

 - Target selection for the JIT just gets the host triple and looks for the best
   target which matches the triple and has a JIT.

llvm-svn: 77060
2009-07-25 10:09:50 +00:00
Sanjiv Gupta
b09f01d842 Mark attributes of return insn correctly. It was being assumed safe to delete in isSafeToDelete (a thing checked-in 76281).
llvm-svn: 77056
2009-07-25 07:48:53 +00:00
Daniel Dunbar
284fe09fe4 Add new helpers for registering targets.
- Less boilerplate == good.

llvm-svn: 77052
2009-07-25 06:49:55 +00:00
Chris Lattner
5af94066ee we already know the sectionkind when invoking SelectSectionForGlobal,
pass it in instead of recomputing it.

llvm-svn: 76990
2009-07-24 18:42:53 +00:00
Chris Lattner
cc951ce3cb make SectionForGlobal non-virtual, add a hook for pic16 to do its "address=" hack.
llvm-svn: 76989
2009-07-24 18:34:27 +00:00
Chris Lattner
a9c1641014 start refactoring pic16 section selection logic.
llvm-svn: 76977
2009-07-24 17:13:27 +00:00
Daniel Dunbar
e3fea713f1 Switch to getNameStr().
llvm-svn: 76962
2009-07-24 08:24:36 +00:00
Chris Lattner
259a7b2a4d simplify code by making special case more obvious
llvm-svn: 76950
2009-07-24 04:59:43 +00:00
Sanjiv Gupta
d62bebab22 Do not call getMangledName on Intrinsics.
llvm-svn: 76842
2009-07-23 02:11:04 +00:00
Daniel Dunbar
3119e6a609 Switch some clients to Value::getName(), and other getName() user
simplification.
 - NFC

llvm-svn: 76789
2009-07-22 21:33:09 +00:00
Eli Friedman
45160af6bd Remove shift amount flavor. It isn't actually complete enough to
be useful, and it's currently unused.  (Some issues: it isn't actually 
rich enough to capture the semantics on many architectures, and
semantics can vary depending on the type being shifted.)

llvm-svn: 76633
2009-07-21 20:12:16 +00:00
Chris Lattner
3d4ab7a231 make AsmPrinter::doFinalization iterate over the global variables
and call PrintGlobalVariable, allowing elimination and simplification
of various targets.

llvm-svn: 76604
2009-07-21 18:38:57 +00:00
Chris Lattner
2c8fed2c75 more random whitespace cleanup, eliminate #define, avoid copying
vectors needlessly, doxygenify comments, improve constness, etc.

llvm-svn: 76585
2009-07-21 17:20:18 +00:00
Chris Lattner
99a474f026 some simple whitespace cleanup, avoid copying vectors for no reason
as much, etc.

llvm-svn: 76578
2009-07-21 16:44:47 +00:00
Chris Lattner
27a2e74e58 clean up some formatting, indent by 2 instead of 4.
llvm-svn: 76490
2009-07-20 22:23:48 +00:00
Chris Lattner
19134c0748 rename TargetAsmInfo::getASDirective -> getDataASDirective
llvm-svn: 76431
2009-07-20 17:12:46 +00:00
Daniel Dunbar
f5a95d9e81 Tweak cmake files for the four targets that don't split CodeGen out.
- We should canonicalize this and get rid of the cmake and llvm-config hacks to
   support both variants.

llvm-svn: 76350
2009-07-19 00:26:46 +00:00
Daniel Dunbar
aca95eac72 Add dependencies from TargetInfo onto .td generation.
- Shouldn't really be necessary, but currently .inc files get included into
   some main target headers.

llvm-svn: 76349
2009-07-19 00:21:12 +00:00
Daniel Dunbar
960ef321ca Put Target definitions inside Target specific header, and llvm namespace.
llvm-svn: 76344
2009-07-18 23:03:22 +00:00
Eli Friedman
7c72917709 Remove some unnecessary expansion markings. Add a few expansion
markings that show up in test/CodeGen/Generic.

llvm-svn: 76160
2009-07-17 07:03:00 +00:00
Daniel Dunbar
90536f6737 Kill off <TARGET>MachineModule variables, and <TARGETASMPRINTER>ForceLink
variables.
 - Module initialization functions supplanted the need for these.

llvm-svn: 75886
2009-07-16 01:55:13 +00:00
Daniel Dunbar
4771afe104 Lift addAssemblyEmitter into LLVMTargetMachine.
- No functionality change.

llvm-svn: 75859
2009-07-15 23:34:19 +00:00
Daniel Dunbar
efb868a754 Register AsmPrinter for XCore, MSP430, and PIC16 targets.
- Switch to standard addAssemblyEmitter logic.

llvm-svn: 75854
2009-07-15 23:17:20 +00:00
Daniel Dunbar
5707dd7f73 Reapply TargetRegistry refactoring commits.
--- Reverse-merging r75799 into '.':
 U   test/Analysis/PointerTracking
U    include/llvm/Target/TargetMachineRegistry.h
U    include/llvm/Target/TargetMachine.h
U    include/llvm/Target/TargetRegistry.h
U    include/llvm/Target/TargetSelect.h
U    tools/lto/LTOCodeGenerator.cpp
U    tools/lto/LTOModule.cpp
U    tools/llc/llc.cpp
U    lib/Target/PowerPC/PPCTargetMachine.h
U    lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp
U    lib/Target/PowerPC/PPCTargetMachine.cpp
U    lib/Target/PowerPC/PPC.h
U    lib/Target/ARM/ARMTargetMachine.cpp
U    lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
U    lib/Target/ARM/ARMTargetMachine.h
U    lib/Target/ARM/ARM.h
U    lib/Target/XCore/XCoreTargetMachine.cpp
U    lib/Target/XCore/XCoreTargetMachine.h
U    lib/Target/PIC16/PIC16TargetMachine.cpp
U    lib/Target/PIC16/PIC16TargetMachine.h
U    lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp
U    lib/Target/Alpha/AlphaTargetMachine.cpp
U    lib/Target/Alpha/AlphaTargetMachine.h
U    lib/Target/X86/X86TargetMachine.h
U    lib/Target/X86/X86.h
U    lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.h
U    lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp
U    lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.h
U    lib/Target/X86/X86TargetMachine.cpp
U    lib/Target/MSP430/MSP430TargetMachine.cpp
U    lib/Target/MSP430/MSP430TargetMachine.h
U    lib/Target/CppBackend/CPPTargetMachine.h
U    lib/Target/CppBackend/CPPBackend.cpp
U    lib/Target/CBackend/CTargetMachine.h
U    lib/Target/CBackend/CBackend.cpp
U    lib/Target/TargetMachine.cpp
U    lib/Target/IA64/IA64TargetMachine.cpp
U    lib/Target/IA64/AsmPrinter/IA64AsmPrinter.cpp
U    lib/Target/IA64/IA64TargetMachine.h
U    lib/Target/IA64/IA64.h
U    lib/Target/MSIL/MSILWriter.cpp
U    lib/Target/CellSPU/SPUTargetMachine.h
U    lib/Target/CellSPU/SPU.h
U    lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp
U    lib/Target/CellSPU/SPUTargetMachine.cpp
U    lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp
U    lib/Target/Mips/MipsTargetMachine.cpp
U    lib/Target/Mips/MipsTargetMachine.h
U    lib/Target/Mips/Mips.h
U    lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp
U    lib/Target/Sparc/SparcTargetMachine.cpp
U    lib/Target/Sparc/SparcTargetMachine.h
U    lib/ExecutionEngine/JIT/TargetSelect.cpp
U    lib/Support/TargetRegistry.cpp

llvm-svn: 75820
2009-07-15 20:24:03 +00:00
Stuart Hastings
ef732a2bea Revert 75762, 75763, 75766..75769, 75772..75775, 75778, 75780, 75782 to repair broken LLVM-GCC build.
Will revert 75770 in the llvm-gcc trunk.

llvm-svn: 75799
2009-07-15 17:27:11 +00:00
Daniel Dunbar
51b81c9930 Provide TargetMachine implementations with reference to Target they were created
from.
 - This commit is almost entirely propogating the reference through the
   TargetMachine subclasses' constructor calls.

llvm-svn: 75778
2009-07-15 12:11:05 +00:00
Daniel Dunbar
a2af870bd7 Register Target's TargetMachine and AsmPrinter in the new registry.
- This abuses TargetMachineRegistry's constructor for now, this will get
   cleaned up in time.

llvm-svn: 75762
2009-07-15 09:22:31 +00:00
Daniel Dunbar
b70d5cdfe1 Add TargetInfo libraries for all targets.
- Intended to match current TargetMachine implementations.

 - No facilities for linking these in yet.

llvm-svn: 75751
2009-07-15 06:35:19 +00:00
David Greene
9c8a1b9b90 Have asm printers use formatted_raw_ostream directly to avoid a
dynamic_cast<>.

llvm-svn: 75670
2009-07-14 20:18:05 +00:00
Chris Lattner
6ec578688d Reapply my previous asmprinter changes now with more testing and two
additional bug fixes:

1. The bug that everyone hit was a problem in the asmprinter where it
   would remove $stub but keep the L prefix on a name when emitting the
   indirect symbol.  This is easy to fix by keeping the name of the stub
   and the name of the symbol in a StringMap instead of just keeping a
   StringSet and trying to reconstruct it late.

2. There was a problem printing the personality function.  The current
   logic to print out the personality function from the DWARF information
   is a bit of a cesspool right now that duplicates a bunch of other 
   logic in the asm printer.  The short version of it is that it depends
   on emitting both the L and _ prefix for symbols (at least on darwin)
   and until I can untangle it, it is best to switch the mangler back to
   emitting both prefixes.

llvm-svn: 75646
2009-07-14 18:17:16 +00:00
Torok Edwin
f955a6ef49 llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.
This adds location info for all llvm_unreachable calls (which is a macro now) in
!NDEBUG builds.
In NDEBUG builds location info and the message is off (it only prints
"UREACHABLE executed").

llvm-svn: 75640
2009-07-14 16:55:14 +00:00
Daniel Dunbar
84d593320b Revert r75615, which depended on 75610.
--- Reverse-merging r75615 into '.':
U    lib/Target/XCore/XCoreAsmPrinter.cpp
U    lib/Target/PIC16/PIC16AsmPrinter.cpp
U    lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.cpp
U    lib/Target/MSP430/MSP430AsmPrinter.cpp
U    lib/Target/IA64/AsmPrinter/IA64AsmPrinter.cpp
U    lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp
U    lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
U    lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp
U    lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp
U    lib/Target/MSIL/MSILWriter.cpp
U    lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp
U    lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp

llvm-svn: 75637
2009-07-14 16:12:13 +00:00
Chris Lattner
8aa18612e2 Rename getValueName -> getMangledName.
llvm-svn: 75615
2009-07-14 06:18:50 +00:00
Torok Edwin
ae8a3ff177 assert(0) -> LLVM_UNREACHABLE.
Make llvm_unreachable take an optional string, thus moving the cerr<< out of
line.
LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for
NDEBUG builds.

llvm-svn: 75379
2009-07-11 20:10:48 +00:00
Duncan Sands
f32be25f82 Avoid compiler warnings when assertions are turned off.
llvm-svn: 75269
2009-07-10 20:10:14 +00:00
Owen Anderson
8970999512 Thread LLVMContext through MVT and related parts of SDISel.
llvm-svn: 75153
2009-07-09 17:57:24 +00:00
Torok Edwin
358888da3a Implement changes from Chris's feedback.
Finish converting lib/Target.

llvm-svn: 75043
2009-07-08 20:53:28 +00:00
Torok Edwin
980729667e Convert more abort() calls to llvm_report_error().
Also remove trailing semicolon.

llvm-svn: 75027
2009-07-08 19:04:27 +00:00
Sanjiv Gupta
e176389cc7 Mark sublw_cc and subfw_cc as Terminator insns so that they are part of the terminator insns for a basic block alongwith branch insns. This way a copy is not getting inserted between cmp and branch during PHIElimination disturbing the status flags.
llvm-svn: 74992
2009-07-08 05:40:05 +00:00
Devang Patel
f24823c177 Avoid directly relying on llvm.dbg.compile_unit and llvm.dbg.global_variables.
PIC16 developers, please verify. Thanks.

llvm-svn: 74880
2009-07-06 23:28:36 +00:00
Devang Patel
f34440a913 Add FIXMEs.
llvm-svn: 74879
2009-07-06 23:11:08 +00:00
Sanjiv Gupta
d9f964a39e pic16 doesn't have a Data64bitsDirective. Set it NULL explicitly to tell the generic code to not pick the default.
llvm-svn: 74839
2009-07-06 18:09:11 +00:00
Sanjiv Gupta
fabfde8fe1 pic16 isn't ready to handle llvm.metadata yet.
llvm-svn: 74838
2009-07-06 18:07:06 +00:00
Sanjiv Gupta
b2d6d00f8d Implement _CONFIG macro to allow users to se to configuration settings on the part.
Implement _section macro to allow users to place objects in specific sections.
Implement _address macro to allow users to place objects at a particular address.
Placing objects at a memory address:
crate a unique section name from varname, address, object type and put that section at specified address. Mark this section a full (size = banksize) so that other objects do not compete for it while placing objects to sections in AsmPrinter.

llvm-svn: 74822
2009-07-06 10:18:37 +00:00
Sanjiv Gupta
2f76e91cc3 Corrected the names description. Change in a comment. No functionality change.
llvm-svn: 74819
2009-07-06 08:22:15 +00:00
Duncan Sands
962a71b15f Silence a warning when assertions are turned off.
llvm-svn: 74778
2009-07-03 16:11:34 +00:00
Sanjiv Gupta
1412c019ac For extended loads of type i1 to i8, we will need to at least one byte from memory.
The change in the .td file is to mark the side effects of mov insn.

llvm-svn: 74768
2009-07-03 07:58:59 +00:00
Tilmann Scheller
cea3c16aa5 Add NumFixedArgs attribute to CallSDNode which indicates the number of fixed arguments in a vararg call.
With the SVR4 ABI on PowerPC, vector arguments for vararg calls are passed differently depending on whether they are a fixed or a variable argument. Variable vector arguments always go into memory, fixed vector arguments are put 
into vector registers. If there are no free vector registers available, fixed vector arguments are put on the stack.

The NumFixedArgs attribute allows to decide for an argument in a vararg call whether it belongs to the fixed or variable portion of the parameter list.

llvm-svn: 74764
2009-07-03 06:44:53 +00:00
Bill Wendling
fdd5badace Update comments to make it clear that the function alignment is the Log2 of the
bytes and not bytes.

llvm-svn: 74624
2009-07-01 18:50:55 +00:00
Daniel Dunbar
bc3d149e98 Remove unused AsmPrinter OptLevel argument, and propogate.
- This more or less amounts to a revert of r65379. I'm curious to know what
   happened that caused this variable to become unused.

llvm-svn: 74579
2009-07-01 01:48:54 +00:00
Bill Wendling
c0fb316bd3 Add an "alignment" field to the MachineFunction object. It makes more sense to
have the alignment be calculated up front, and have the back-ends obey whatever
alignment is decided upon.

This allows for future work that would allow for precise no-op placement and the
like.

llvm-svn: 74564
2009-06-30 22:38:32 +00:00
Daniel Dunbar
f7c439154f Fix may-be-used-uninitialized warning.
llvm-svn: 74253
2009-06-26 02:03:52 +00:00
Sanjiv Gupta
a68f1e8cbf Added floating point conditional operations support via libcalls.
llvm-svn: 74187
2009-06-25 18:12:06 +00:00
Sanjiv Gupta
f81b920608 Identify unconditional gotos and generate a page sel instructions before them.
llvm-svn: 74172
2009-06-25 11:03:14 +00:00
Bob Wilson
7bd642b80c Provide InitializeAllTargets and InitializeNativeTarget functions in the
C bindings.  Change all the backend "Initialize" functions to have C linkage.
Change the "llvm/Config/Targets.def" header to use C-style comments to avoid
compile warnings.

llvm-svn: 74026
2009-06-23 23:59:40 +00:00
Sanjiv Gupta
9af2c63924 Fold the add (ptr, offset) into ptr[offset] only if the offset is small enough. movwi and moviw allow value of 5-bits only (i.e. 32).
llvm-svn: 73953
2009-06-23 07:10:19 +00:00
Devang Patel
e2b1c9a530 mv CodeGen/DebugLoc.h Support/DebugLoc.h
llvm-svn: 73786
2009-06-19 22:08:58 +00:00
Douglas Gregor
f5291553f2 Introduce new headers whose inclusion forces linking and
initialization of all targets (InitializeAllTargets.h) or assembler
printers (InitializeAllAsmPrinters.h). This is a step toward the
elimination of relinked object files, so that we can build normal
archives.

llvm-svn: 73543
2009-06-16 20:12:29 +00:00
Sanjiv Gupta
48be9f7588 Added missing libcalls for floating point to int conversions.
llvm-svn: 73491
2009-06-16 16:17:35 +00:00
Sanjiv Gupta
0202fc2b88 Code Restructuring. No functionality change.
llvm-svn: 73481
2009-06-16 09:45:18 +00:00
Sanjiv Gupta
693a8c54e4 The subprogram descriptor for a function may be missing (llvm-ld linking two static functions with same name), so pick up the compilation unit for the function from the first valid debug loc of its instructions.
This patch also emits debug info for structure (aggregate types in 
general) types.

llvm-svn: 73295
2009-06-13 17:35:54 +00:00
Sanjiv Gupta
4d678059ba Generate libcalls for floating point arithmetic and casting operations.
llvm-svn: 73194
2009-06-11 16:50:48 +00:00
Sanjiv Gupta
1f8f8ce400 More formatting.
llvm-svn: 73185
2009-06-11 06:55:48 +00:00
Sanjiv Gupta
04cb690c99 Fixed source comments. No functionality change.
llvm-svn: 73184
2009-06-11 06:49:55 +00:00
Sanjiv Gupta
2121a84223 PIC16 emits auto variables as globals. When optimizer removes a function entierly by estimating its side effects on globals, those globals(autos) without a function were not being printed by the Asm printer.
llvm-svn: 73135
2009-06-09 15:31:19 +00:00
Sanjiv Gupta
78216ed49c Lower i16/i32 sdiv/udiv/srem/urem using libcalls.
llvm-svn: 72942
2009-06-05 14:43:12 +00:00
Sanjiv Gupta
aba7b3b661 Remove unused code.
llvm-svn: 72866
2009-06-04 15:16:24 +00:00
Sanjiv Gupta
f0fb280dd7 Custom lower SUB with two register operands.
llvm-svn: 72861
2009-06-04 08:52:28 +00:00
Mike Stump
a864e12f97 Make the buildbot see green (to make it easier to spot the next person
that puts a new warning in).

llvm-svn: 72797
2009-06-03 19:07:46 +00:00
Sanjiv Gupta
ea551a1e7c Emit file directives correctly in case of a .bc is generated by llvm-ld after linking in several .bc files.
llvm-svn: 72781
2009-06-03 16:27:49 +00:00
Sanjiv Gupta
aa07dba151 FrameIndex could be used as a value (addressof (arg)) or as an address.
Expand it exactly like GlobalAddress.
Fix some more crashes (InsertBranch() not being implemented) for compiling hitec libs.

llvm-svn: 72776
2009-06-03 15:31:12 +00:00
Sanjiv Gupta
0679a0baee Fixed a bug in which signed comparisons were being used instead of unsigned comparisons.
llvm-svn: 72771
2009-06-03 13:36:44 +00:00
Dale Johannesen
548149ef8d Comment grammaro/clarification.
llvm-svn: 72706
2009-06-01 23:13:42 +00:00
Bill Wendling
8235a05c1a Untabification.
llvm-svn: 72604
2009-05-30 01:09:53 +00:00
Sanjiv Gupta
c31e720f0e Emit debug info for locals with proper scope.
llvm-svn: 72531
2009-05-28 18:24:11 +00:00
Sanjiv Gupta
efc1b70b9e Mark the branch insns correctly.
llvm-svn: 72529
2009-05-28 17:32:56 +00:00
Sanjiv Gupta
b8df12a7ab Fixing problems that got exposed after the refactoring of LegalizeDAG done in 72447.
llvm-svn: 72521
2009-05-28 06:59:57 +00:00
Anton Korobeynikov
34fc85e2ee Propagate CPU string out of SubtargetFeatures
llvm-svn: 72335
2009-05-23 19:50:50 +00:00
Oscar Fuentes
832290edfe CMake: Use libpthread in tblgen when needed. Updated list of source
files for PIC16 target.

llvm-svn: 72277
2009-05-22 20:55:15 +00:00
Sanjiv Gupta
07574e0dfa Emit debug information for globals (which include automatic variables as well because on PIC16 they are emitted as globals by the frontend).
llvm-svn: 72262
2009-05-22 13:58:45 +00:00
Bill Wendling
e421c8f63d Change MachineInstrBuilder::addReg() to take a flag instead of a list of
booleans. This gives a better indication of what the "addReg()" is
doing. Remembering what all of those booleans mean isn't easy, especially if you
aren't spending all of your time in that code.

I took Jakob's suggestion and made it illegal to pass in "true" for the
flag. This should hopefully prevent any unintended misuse of this (by reverting
to the old way of using addReg()).

llvm-svn: 71722
2009-05-13 21:33:08 +00:00
Sanjiv Gupta
ad40927f6a Run through the list of globals once and sectionize all types of globlas includeing declarations. Later emit them from their section lists.
llvm-svn: 71661
2009-05-13 15:13:17 +00:00
Sanjiv Gupta
b1a0a4a7f5 Iterate over globals once and sectionize them into appropriate sections.
Later in asmprinter, go over thsese sections and print them.
Do not print empty sections.

llvm-svn: 71560
2009-05-12 17:07:27 +00:00
Sanjiv Gupta
ead0ba2ea0 We do not need to create a label for external defs and decls,
just emit a comment for readability.

llvm-svn: 71544
2009-05-12 06:52:41 +00:00
Sanjiv Gupta
e60e9f8c0b Mark mayLoad, mayStore for insns correctly and use them
to check if an insn is accessing memory during mem sel optimization.

llvm-svn: 71537
2009-05-12 04:30:38 +00:00
Sanjiv Gupta
264cfd0017 Fix more naming issues.
compiler libcalls start with .lib. now.
fixed section names.

llvm-svn: 71424
2009-05-11 08:52:04 +00:00
Sanjiv Gupta
0506627b14 Detect calls to compiler intrinsics and emit an extern declarations
only for those. These extern declarations to intrinsics are currently 
being emitted at the bottom of generated .s file, which works fine with
gpasm(not sure about MPSAM though).
PIC16 linker generates errors for few cases (function-args/struct_args_5) if you do not include any
extern declarations (even if no intrinsics are being used), but that
needs to be fixed in the linker itself.

llvm-svn: 71423
2009-05-11 06:01:38 +00:00
Sanjiv Gupta
03acc3e940 Module iterator contains list of filescope functions as well, we don't need to emit and global declarations for them. This was working earlier and was broken during one of the recent commit for PIC16 naming.
llvm-svn: 71394
2009-05-10 16:18:39 +00:00
Sanjiv Gupta
07c4b65112 Changed lowering and asmprinter to use ABI Names class called PAN.
llvm-svn: 71386
2009-05-10 05:23:47 +00:00
Duncan Sands
f7af13b2d4 Rename PaddedSize to AllocSize, in the hope that this
will make it more obvious what it represents, and stop
it being confused with the StoreSize.

llvm-svn: 71349
2009-05-09 07:06:46 +00:00
Sanjiv Gupta
65a3fde6a5 Use 16 bit arithmetic while retrieving the address of callee's frame during indirect function calls, and set pclath before every call to retrieve the frame address.
llvm-svn: 71323
2009-05-09 05:11:19 +00:00
Nick Lewycky
575cf1d259 Add missing #include for "strlen" which is used inline in this header. Fixes
build under gcc 4.3.

llvm-svn: 71208
2009-05-08 06:22:25 +00:00
Sanjiv Gupta
3a905e7586 Moved pic16 naming functions to correct place.
No functionality change.

llvm-svn: 71207
2009-05-08 04:50:14 +00:00
Evan Cheng
1109c5103e Eliminate compiler warnings.
llvm-svn: 71149
2009-05-07 05:31:56 +00:00
Oscar Fuentes
a06115b0ab CMake: Updated lib/Target/PIC16/CMakeLists.txt.
llvm-svn: 71115
2009-05-06 20:40:05 +00:00
Sanjiv Gupta
cc6f71e64c Emit banksel and movlp instructions.
Split large global data (both initialized and un-initialized) into multiple sections of <= 80 bytes.
Provide routines to manage PIC16 ABI naming conventions.

llvm-svn: 71073
2009-05-06 08:02:01 +00:00
Bill Wendling
40a162f75f Instead of passing in an unsigned value for the optimization level, use an enum,
which better identifies what the optimization is doing. And is more flexible for
future uses.

llvm-svn: 70440
2009-04-29 23:29:43 +00:00
Sanjiv Gupta
b1c777e865 Add a public method called getAddressSpace() to the GlobalAddressSDNode.
llvm-svn: 70366
2009-04-29 04:43:24 +00:00
Bill Wendling
7546bed590 Second attempt:
Massive check in. This changes the "-fast" flag to "-O#" in llc. If you want to
use the old behavior, the flag is -O0. This change allows for finer-grained
control over which optimizations are run at different -O levels.

Most of this work was pretty mechanical. The majority of the fixes came from
verifying that a "fast" variable wasn't used anymore. The JIT still uses a
"Fast" flag. I'll change the JIT with a follow-up patch.

llvm-svn: 70343
2009-04-29 00:15:41 +00:00
Sanjiv Gupta
19e7fe61ce GlobalValue is always pointer type, so an assert isn't required.
llvm-svn: 70300
2009-04-28 16:39:45 +00:00
Bill Wendling
ef47ace92f r70270 isn't ready yet. Back this out. Sorry for the noise.
llvm-svn: 70275
2009-04-28 01:04:53 +00:00
Bill Wendling
2799e916c3 Massive check in. This changes the "-fast" flag to "-O#" in llc. If you want to
use the old behavior, the flag is -O0. This change allows for finer-grained
control over which optimizations are run at different -O levels.

Most of this work was pretty mechanical. The majority of the fixes came from
verifying that a "fast" variable wasn't used anymore. The JIT still uses a
"Fast" flag. I'm not 100% sure if it's necessary to change it there...

llvm-svn: 70270
2009-04-28 00:21:31 +00:00
Sanjiv Gupta
0457bf4420 Banksel immediate constant will always immediately follow the GA/ES, so scan an insn from beginnin to find out the banksel operand.
llvm-svn: 69883
2009-04-23 10:34:58 +00:00
Sanjiv Gupta
60c6705684 Make the function begin label start after ther data pointer.
The address of data frame for function can be obtained by subtracting 2 from the function begin label.

llvm-svn: 69801
2009-04-22 12:02:36 +00:00
Sanjiv Gupta
30ea654901 Handle direct aggregate type arguments.
llvm-svn: 69665
2009-04-21 05:54:51 +00:00
Daniel Dunbar
6326c97515 Remove unused variable.
llvm-svn: 69624
2009-04-20 20:34:38 +00:00
Sanjiv Gupta
44b55dc966 Emit the auto variables of a function into a different section than parameters.
llvm-svn: 69605
2009-04-20 16:59:35 +00:00
Sanjiv Gupta
b03b007054 Handle aggregate type arguments to direct and indirect calls.
llvm-svn: 69022
2009-04-14 02:49:52 +00:00
Sanjiv Gupta
04a7716d62 While passing arg of types larger than char only one byte at lower end was getting passed. We couldn't catch this as we did not have tests that were passing an int value larger than 256.
llvm-svn: 68946
2009-04-13 09:38:38 +00:00
Sanjiv Gupta
6962a75641 Added code to handle spilling and reloading of FSRs.
llvm-svn: 68783
2009-04-10 15:10:14 +00:00
Sanjiv Gupta
14c26ced49 The way we are trying to figure out banksel immediate operand may yield different results for different type of insns. This will eventually need to be changed but currently let us prevent the crash in cases of incorrect detection of banksel operand.
llvm-svn: 68713
2009-04-09 17:06:24 +00:00
Sanjiv Gupta
daa922501d Arguments to indirect calls were being passed incorrectly. They are not fixed to start after return value.
llvm-svn: 68705
2009-04-09 10:29:32 +00:00
Sanjiv Gupta
3baf157321 r68576 unconverd a bug in PIC16 port (Thanks to Dan Gohman) where we were custom lowering an ADD to ADDC.
llvm-svn: 68671
2009-04-09 04:03:43 +00:00
Sanjiv Gupta
8830b56cba Emit .line debug directives for stoppoints. The debug location is retrieved by the MachineInstr itself, rather than by custom handling the DBG_STOPPOINT nodes.
llvm-svn: 68602
2009-04-08 06:24:04 +00:00
Sanjiv Gupta
bbb78a0034 Handle indirect function calls.
Every function has the address of its frame in the beginning of code section.
The frame address is retrieved and used to pass arguments.

llvm-svn: 68597
2009-04-08 05:38:48 +00:00
Sanjiv Gupta
14d86f7755 Map stack based frameindices for spills to zero based indices that can be accessed based on an external symbol defining the location of temporary data for a function. For example: we have spill slots addressed as foo.tmp + 0, foo.tmp + 1 etc.
llvm-svn: 68442
2009-04-06 10:54:50 +00:00
Sanjiv Gupta
7ec088a3de Fixed build warnings.
llvm-svn: 68333
2009-04-02 18:33:12 +00:00
Sanjiv Gupta
01fb90085c To convert the StopPoint insn into an assembler directive by ISel, we need to have access to the line number field. So we convert that info as an operand by custom handling DBG_STOPPOINT in legalize.
llvm-svn: 68329
2009-04-02 18:03:10 +00:00
Sanjiv Gupta
1555a0a503 Params are not being generated as static globals now. The caller passes them onto the callee's stack directly and the callee loads the argvals from its own stack. Clang generated frameindexes validatd by recalculating the stack as if all frameindexes represent 1-byte slots.
llvm-svn: 68327
2009-04-02 17:42:00 +00:00
Evan Cheng
3a7489a4cc CodeGen still defaults to non-verbose asm, but llc now overrides it and default to verbose.
llvm-svn: 67668
2009-03-25 01:47:28 +00:00
Sanjiv Gupta
d5c51dc50c Fixed comment for libcalls.
llvm-svn: 67373
2009-03-20 14:10:20 +00:00
Sanjiv Gupta
19dc27b7cf Reformatting. Inserted code comments. Cleaned interfaces.
Removed unncessary code. No functionality change.

llvm-svn: 67371
2009-03-20 13:42:20 +00:00
Sanjiv Gupta
09e6929cc5 Forgot to check-in this as part of 7761.
llvm-svn: 66763
2009-03-12 03:20:07 +00:00
Sanjiv Gupta
85826620f1 Banksel optimization is now based on the section names of symbols, since the symbols in one section will always be put into one bank.
llvm-svn: 66761
2009-03-12 02:10:45 +00:00
Sanjiv Gupta
766590cde2 Mark the Defs and Uses of STATUS register correctly, plus some reformatting.
llvm-svn: 66540
2009-03-10 10:35:34 +00:00
Bill Wendling
9d4eb136da Overhaul my earlier submission due to feedback. It's a large patch, but most of
them are generic changes.

- Use the "fast" flag that's already being passed into the asm printers instead
  of shoving it into the DwarfWriter.

- Instead of calling "MI->getParent()->getParent()" for every MI, set the
  machine function when calling "runOnMachineFunction" in the asm printers.

llvm-svn: 65379
2009-02-24 08:30:20 +00:00
Bill Wendling
306b992133 Put code that generates debug labels into TableGen so that it can be used by
everyone.

llvm-svn: 64978
2009-02-18 23:12:06 +00:00
Dale Johannesen
9c596981ed Remove refs to non-DebugLoc version of BuildMI from XCore, PIC16.
llvm-svn: 64432
2009-02-13 02:29:03 +00:00
Bill Wendling
d31cb3d5aa Move debug loc info along when the spiller creates new instructions.
llvm-svn: 64342
2009-02-12 00:02:55 +00:00
Sanjiv Gupta
abf1d4e9db Function temporaries can not overlap with retval or args.See the comment in source code to know the reason. Anything having .auto. in its name is local to a function in nature irrespective of the linkage specified. print static local variables in module level IDATA section.
llvm-svn: 64199
2009-02-10 04:20:26 +00:00
Dan Gohman
4105a38248 Constify TargetInstrInfo::EmitInstrWithCustomInserter, allowing
ScheduleDAG's TLI member to use const.

llvm-svn: 64018
2009-02-07 16:15:20 +00:00
Dale Johannesen
a259483aae Get rid of the last non-DebugLoc versions of getNode!
Many targets build placeholder nodes for special operands, e.g.
GlobalBaseReg on X86 and PPC for the PIC base.  There's no
sensible way to associate debug info with these.  I've left
them built with getNode calls with explicit DebugLoc::getUnknownLoc operands. 
I'm not too happy about this but don't see a good improvement;
I considered adding a getPseudoOperand or something, but it
seems to me that'll just make it harder to read.

llvm-svn: 63992
2009-02-07 00:55:49 +00:00
Dale Johannesen
1580ab6b7f Remove more non-DebugLoc getNode variants. Use
getCALLSEQ_{END,START} to permit passing no DebugLoc
there.  UNDEF doesn't logically have DebugLoc; add
getUNDEF to encapsulate this.

llvm-svn: 63978
2009-02-06 23:05:02 +00:00
Dale Johannesen
c405486235 Remove more non-DebugLoc versions of getNode.
llvm-svn: 63969
2009-02-06 21:50:26 +00:00
Sanjiv Gupta
90fd43f44d Print globl directive for variables with external linkage (global variables).
llvm-svn: 63943
2009-02-06 18:24:59 +00:00
Dale Johannesen
e95c76b65e Get rid of one more non-DebugLoc getNode and
its corresponding getTargetNode.  Lots of
caller changes.

llvm-svn: 63904
2009-02-06 01:31:28 +00:00
Dale Johannesen
c901d013fb Get rid of 3 non-DebugLoc getNode variants.
llvm-svn: 63808
2009-02-05 01:01:16 +00:00
Dale Johannesen
c2896f9310 Remove non-DebugLoc versions of getMergeValues, ZeroExtendInReg.
llvm-svn: 63800
2009-02-05 00:20:09 +00:00
Dale Johannesen
2c4af04551 Remove a few non-DebugLoc versions of node creation
functions.

llvm-svn: 63703
2009-02-04 01:17:06 +00:00
Sanjiv Gupta
c47a19b23e Made the common case of default address space directive as non-virtual for performance reasons. Provide a single virtual interface for directives of all sizes in non-default address spaces.
llvm-svn: 63521
2009-02-02 16:53:06 +00:00
Dale Johannesen
39738b1ff8 Make LowerCallTo and LowerArguments take a DebugLoc
argument.  Adjust all callers and overloaded versions.

llvm-svn: 63444
2009-01-30 23:10:59 +00:00
Sanjiv Gupta
11d082d56e Fixed the comment. No functionality change.
llvm-svn: 63387
2009-01-30 09:01:44 +00:00
Sanjiv Gupta
b4cf873468 Use sublw for comparison with literals instead of subwf.
llvm-svn: 63382
2009-01-30 07:55:25 +00:00
Sanjiv Gupta
e442452ade Enable emitting of constant values in non-default address space as well. The APIs emitting constants now take an additional parameter signifying the address space in which to emit. The APIs like getData8BitsDirective() etc are made virtual enabling targets to be able to define appropirate directivers for various sizes and address spaces.
llvm-svn: 63377
2009-01-30 04:25:10 +00:00
Sanjiv Gupta
ebef67f13c Fixed build warnings. Restoring changes done in 62600, they were lost in 62655.
llvm-svn: 62681
2009-01-21 09:02:46 +00:00
Duncan Sands
392dc77fc6 Cleanup whitespace and comments, and tweak some
prototypes, in operand type legalization.  No
functionality change.

llvm-svn: 62680
2009-01-21 09:00:29 +00:00
Sanjiv Gupta
37fdb5ca11 Implement LowerOperationWrapper for legalizer.
Also a few signed comparison fixes.

llvm-svn: 62665
2009-01-21 05:44:05 +00:00