summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/CppBackend
Commit message (Collapse)AuthorAgeFilesLines
...
* LLVMBuild: Introduce a common section which currently has a list of theDaniel Dunbar2011-12-121-0/+3
| | | | | | | | | | | subdirectories to traverse into. - Originally I wanted to avoid this and just autoscan, but this has one key flaw in that new subdirectories can not automatically trigger a rerun of the llvm-build tool. This is particularly a pain when switching back and forth between trees where one has added a subdirectory, as the dependencies will tend to be wrong. This will also eliminates FIXME implicitly. llvm-svn: 146436
* LLVMBuild: Remove trailing newline, which irked me.Daniel Dunbar2011-12-122-2/+0
| | | | llvm-svn: 146409
* Move global variables in TargetMachine into new TargetOptions class. As an APINick Lewycky2011-12-021-2/+2
| | | | | | | | | | | | change, now you need a TargetOptions object to create a TargetMachine. Clang patch to follow. One small functionality change in PTX. PTX had commented out the machine verifier parts in their copy of printAndVerify. That now calls the version in LLVMTargetMachine. Users of PTX who need verification disabled should rely on not passing the command-line flag to enable it. llvm-svn: 145714
* build/CMake: Finish removal of add_llvm_library_dependencies.Daniel Dunbar2011-11-292-13/+0
| | | | llvm-svn: 145420
* Sink codegen optimization level into MCCodeGenInfo along side relocation modelEvan Cheng2011-11-162-3/+2
| | | | | | | and code model. This eliminates the need to pass OptLevel flag all over the place and makes it possible for any codegen pass to use this information. llvm-svn: 144788
* build: Attempt to rectify inconsistencies between CMake and LLVMBuild ↵Daniel Dunbar2011-11-122-1/+2
| | | | | | | | versions of explicit dependencies. - The hope is that we have a tool/test to verify these are accurate (and tight) soon. llvm-svn: 144444
* build: Rename CBackend and CppBackend libraries to have CodeGen suffix, forDaniel Dunbar2011-11-102-3/+3
| | | | | | consistency with other targets. llvm-svn: 144292
* llvm-build: Add --native-target and --enable-targets options, and add logic toDaniel Dunbar2011-11-101-1/+0
| | | | | | | | | | handle defining the "magic" target related components (like native, nativecodegen, and engine). - We still require these components to be in the project (currently in lib/Target) so that we have a place to document them and hopefully make it more obvious that they are "magic". llvm-svn: 144253
* llvm-build: Change CBackend and CppBackend to not use library_name. This willDaniel Dunbar2011-11-101-1/+0
| | | | | | | | | change the generated library .a file name once we fully switch over, but simplifies how we treat these targets without requiring more special casing (since their library group name and the codegen library name currently map to the same "llvm-config" style component name). llvm-svn: 144251
* llvm-build: Add an explicit component type to represent targets.Daniel Dunbar2011-11-101-1/+1
| | | | | | - Gives us a place to hang target specific metadata (like whether the target has a JIT). llvm-svn: 144250
* Add missing argument for atomic instructions in c++ backend. PR11268, part 2.Eli Friedman2011-11-041-3/+3
| | | | llvm-svn: 143712
* build: Add initial cut at LLVMBuild.txt files.Daniel Dunbar2011-11-032-0/+55
| | | | llvm-svn: 143634
* Add support for new atomics to cpp backend. Misc other fixes while I'm ↵Eli Friedman2011-10-311-2/+97
| | | | | | here. PR11268. llvm-svn: 143406
* Always check if a method or a type exist before trying to create it.Nicolas Geoffray2011-10-081-12/+23
| | | | llvm-svn: 141490
* Add the returns_twice attribute to LLVM.Rafael Espindola2011-10-031-1/+1
| | | | llvm-svn: 141001
* Clean up uses of switch instructions so they are not dependent on the ↵Eli Friedman2011-09-291-7/+10
| | | | | | operand ordering. Patch by Stepan Dyatkovskiy. llvm-svn: 140803
* Change:Richard Trieu2011-09-211-1/+1
| | | | | | | | | | | | assert(!"error message"); To: assert(0 && "error message"); which is more consistant across the code base. llvm-svn: 140234
* Update the C++ backend to use the new ArrayRef'ified APIs. Patch by arrowdodger!Nick Lewycky2011-09-051-4/+3
| | | | llvm-svn: 139124
* Move TargetRegistry and TargetSelect from Target to Support where they belong.Evan Cheng2011-08-242-2/+2
| | | | | | These are strictly utilities for registering targets and components. llvm-svn: 138450
* switch to the new struct apis.Chris Lattner2011-08-121-3/+3
| | | | llvm-svn: 137481
* Add missing attributes to the C++ backend's output.Bill Wendling2011-08-091-0/+3
| | | | llvm-svn: 137091
* Add the 'resume' instruction for the new EH rewrite.Bill Wendling2011-07-311-0/+5
| | | | | | | | | This adds the 'resume' instruction class, IR parsing, and bitcode reading and writing. The 'resume' instruction resumes propagation of an existing (in-flight) exception whose unwinding was interrupted with a 'landingpad' instruction (to be added later). llvm-svn: 136589
* Revert r136253, r136263, r136269, r136313, r136325, r136326, r136329, r136338,Bill Wendling2011-07-301-8/+0
| | | | | | | r136339, r136341, r136369, r136387, r136392, r136396, r136429, r136430, r136444, r136445, r136446, r136253 pending review. llvm-svn: 136556
* Rewrite the CMake build to use explicit dependencies between libraries,Chandler Carruth2011-07-292-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | specified in the same file that the library itself is created. This is more idiomatic for CMake builds, and also allows us to correctly specify dependencies that are missed due to bugs in the GenLibDeps perl script, or change from compiler to compiler. On Linux, this returns CMake to a place where it can relably rebuild several targets of LLVM. I have tried not to change the dependencies from the ones in the current auto-generated file. The only places I've really diverged are in places where I was seeing link failures, and added a dependency. The goal of this patch is not to start changing the dependencies, merely to move them into the correct location, and an explicit form that we can control and change when necessary. This also removes a serialization point in the build because we don't have to scan all the libraries before we begin building various tools. We no longer have a step of the build that regenerates a file inside the source tree. A few other associated cleanups fall out of this. This isn't really finished yet though. After talking to dgregor he urged switching to a single CMake macro to construct libraries with both sources and dependencies in the arguments. Migrating from the two macros to that style will be a follow-up patch. Also, llvm-config is still generated with GenLibDeps.pl, which means it still has slightly buggy dependencies. The internal CMake 'llvm-config-like' macro uses the correct explicitly specified dependencies however. A future patch will switch llvm-config generation (when using CMake) to be based on these deps as well. This may well break Windows. I'm getting a machine set up now to dig into any failures there. If anyone can chime in with problems they see or ideas of how to solve them for Windows, much appreciated. llvm-svn: 136433
* Merge the contents from exception-handling-rewrite to the mainline.Bill Wendling2011-07-271-0/+8
| | | | | | This adds the new instructions 'landingpad' and 'resume'. llvm-svn: 136253
* Update generated code to use new API of GetElementPtrInst::Create.Nicolas Geoffray2011-07-261-2/+1
| | | | llvm-svn: 136138
* Move CBackend and CppBackend MC initialization to TargetInfo.Evan Cheng2011-07-252-2/+2
| | | | llvm-svn: 135982
* Combine all MC initialization routines into one. e.g. InitializeX86MCAsmInfo,Evan Cheng2011-07-221-9/+1
| | | | | | InitializeX86MCInstrInfo, etc. are combined into InitializeX86TargetMC. llvm-svn: 135812
* Update generated CPP code with the new API on CallInst::Create and ↵Nicolas Geoffray2011-07-211-5/+2
| | | | | | ConstantExpr::getGetElementPtr. llvm-svn: 135704
* - Move CodeModel from a TargetMachine global option to MCCodeGenInfo.Evan Cheng2011-07-201-1/+2
| | | | | | | | - Introduce JITDefault code model. This tells targets to set different default code model for JIT. This eliminates the ugly hack in TargetMachine where code model is changed after construction. llvm-svn: 135580
* Introduce MCCodeGenInfo, which keeps information that can affect codegenEvan Cheng2011-07-192-2/+4
| | | | | | | (including compilation, assembly). Move relocation model Reloc::Model from TargetMachine to MCCodeGenInfo so it's accessible even without TargetMachine. llvm-svn: 135468
* Sink getDwarfRegNum, getLLVMRegNum, getSEHRegNum from TargetRegisterInfo downEvan Cheng2011-07-181-6/+4
| | | | | | | | | to MCRegisterInfo. Also initialize the mapping at construction time. This patch eliminate TargetRegisterInfo from TargetAsmInfo. It's another step towards fixing the layering violation. llvm-svn: 135424
* land David Blaikie's patch to de-constify Type, with a few tweaks.Chris Lattner2011-07-181-22/+22
| | | | llvm-svn: 135375
* Rename createAsmInfo to createMCAsmInfo and move registration code to ↵Evan Cheng2011-07-141-0/+3
| | | | | | MCTargetDesc to prepare for next round of changes. llvm-svn: 135219
* After type-system-rewrite branch update the Cpp backend to not use OpaqueType.Nicolas Geoffray2011-07-141-103/+46
| | | | llvm-svn: 135186
* - Eliminate MCCodeEmitter's dependency on TargetMachine. It now uses MCInstrInfoEvan Cheng2011-07-111-1/+5
| | | | | | | | | | | | and MCSubtargetInfo. - Added methods to update subtarget features (used when targets automatically detect subtarget features or switch modes). - Teach X86Subtarget to update MCSubtargetInfo features bits since the MCSubtargetInfo layer can be shared with other modules. - These fixes .code 16 / .code 32 support since mode switch is updated in MCSubtargetInfo so MC code emitter can do the right thing. llvm-svn: 134884
* Land the long talked about "type system rewrite" patch. ThisChris Lattner2011-07-091-63/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | patch brings numerous advantages to LLVM. One way to look at it is through diffstat: 109 files changed, 3005 insertions(+), 5906 deletions(-) Removing almost 3K lines of code is a good thing. Other advantages include: 1. Value::getType() is a simple load that can be CSE'd, not a mutating union-find operation. 2. Types a uniqued and never move once created, defining away PATypeHolder. 3. Structs can be "named" now, and their name is part of the identity that uniques them. This means that the compiler doesn't merge them structurally which makes the IR much less confusing. 4. Now that there is no way to get a cycle in a type graph without a named struct type, "upreferences" go away. 5. Type refinement is completely gone, which should make LTO much MUCH faster in some common cases with C++ code. 6. Types are now generally immutable, so we can use "Type *" instead "const Type *" everywhere. Downsides of this patch are that it removes some functions from the C API, so people using those will have to upgrade to (not yet added) new API. "LLVM 3.0" is the right time to do this. There are still some cleanups pending after this, this patch is large enough as-is. llvm-svn: 134829
* Change createAsmParser to take a MCSubtargetInfo instead of triple,Evan Cheng2011-07-091-0/+5
| | | | | | | | | CPU, and feature string. Parsing some asm directives can change subtarget state (e.g. .code 16) and it must be reflected in other modules (e.g. MCCodeEmitter). That is, the MCSubtargetInfo instance must be shared. llvm-svn: 134795
* Eliminate asm parser's dependency on TargetMachine:Evan Cheng2011-07-081-1/+1
| | | | | | | | | | - Each target asm parser now creates its own MCSubtatgetInfo (if needed). - Changed AssemblerPredicate to take subtarget features which tablegen uses to generate asm matcher subtarget feature queries. e.g. "ModeThumb,FeatureThumb2" is translated to "(Bits & ModeThumb) != 0 && (Bits & FeatureThumb2) != 0". llvm-svn: 134678
* Fix the ridiculous SubtargetFeatures API where it implicitly expects CPU name toEvan Cheng2011-06-301-1/+1
| | | | | | | | | | be the first encoded as the first feature. It then uses the CPU name to look up features / scheduling itineray even though clients know full well the CPU name being used to query these properties. The fix is to just have the clients explictly pass the CPU name! llvm-svn: 134127
* CppBackend: fixup for api changeDylan Noblesmith2011-06-231-1/+0
| | | | | | This broke after r133364. llvm-svn: 133709
* Reinstate r133513 (reverted in r133700) with an additional fix for aJay Foad2011-06-231-1/+1
| | | | | | -Wshorten-64-to-32 warning in Instructions.h. llvm-svn: 133708
* Revert r133513:Eric Christopher2011-06-231-1/+1
| | | | | | | | | "Reinstate r133435 and r133449 (reverted in r133499) now that the clang self-hosted build failure has been fixed (r133512)." Due to some additional warnings. llvm-svn: 133700
* Reinstate r133435 and r133449 (reverted in r133499) now that the clangJay Foad2011-06-211-1/+1
| | | | | | self-hosted build failure has been fixed (r133512). llvm-svn: 133513
* Revert r133435 and r133449 to appease buildbots.Chad Rosier2011-06-211-1/+1
| | | | llvm-svn: 133499
* Change how PHINodes store their operands.Jay Foad2011-06-201-1/+1
| | | | | | | | | | | | | | | | | | | Change PHINodes to store simple pointers to their incoming basic blocks, instead of full-blown Uses. Note that this loses an optimization in SplitCriticalEdge(), because we can no longer walk the use list of a BasicBlock to find phi nodes. See the comment I removed starting "However, the foreach loop is slow for blocks with lots of predecessors". Extend replaceAllUsesWith() on a BasicBlock to also update any phi nodes in the block's successors. This mimics what would have happened when PHINodes were proper Users of their incoming blocks. (Note that this only works if OldBB->replaceAllUsesWith(NewBB) is called when OldBB still has a terminator instruction, so it still has some successors.) llvm-svn: 133435
* Make better use of the PHINode API.Jay Foad2011-06-201-2/+3
| | | | | | | | Change various bits of code to make better use of the existing PHINode API, to insulate them from forthcoming changes in how PHINodes store their operands. llvm-svn: 133434
* Fix a FIXME by making GlobalVariable::getInitializer() return aJay Foad2011-06-191-3/+3
| | | | | | const Constant *. llvm-svn: 133400
* Bugfix in the Cpp backend after API change on PHINode::Create.Nicolas Geoffray2011-04-101-1/+1
| | | | llvm-svn: 129248
* Remove PHINode::reserveOperandSpace(). Instead, add a parameter toJay Foad2011-03-301-4/+2
| | | | | | PHINode::Create() giving the (known or expected) number of operands. llvm-svn: 128537
OpenPOWER on IntegriCloud