- Aug 11, 2009
-
-
Owen Anderson authored
llvm-svn: 78610
-
- Aug 10, 2009
-
-
Owen Anderson authored
Start moving TargetLowering away from using full MVTs and towards SimpleValueType, which will simplify the privatization of IntegerType in the future. llvm-svn: 78584
-
Dan Gohman authored
llvm-svn: 78569
-
- Aug 08, 2009
-
-
Jakob Stoklund Olesen authored
Blackfin supports and/or/xor on i32 but not on i16. Teach DAGCombiner::SimplifyBinOpWithSameOpcodeHands to not produce illegal nodes after legalize ops. llvm-svn: 78497
-
- Aug 07, 2009
-
-
Dale Johannesen authored
llvm-svn: 78350
-
- Aug 06, 2009
-
-
Dan Gohman authored
and LowerReturn, to verify that the targets' hooks have respected some of their postconditions. llvm-svn: 78312
-
Dan Gohman authored
types don't have any return values, from CodeGen's perspective. This fixes PR4688. llvm-svn: 78311
-
Dan Gohman authored
and high-bits values in ways that weren't correct for integer types wider than 64 bits. This fixes a miscompile in PPMacroExpansion.cpp in clang on x86-64. llvm-svn: 78295
-
- Aug 05, 2009
-
-
Dan Gohman authored
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
-
- Aug 04, 2009
-
-
Dan Gohman authored
TLI.computeMaskedBitsForTargetNode from ComputeMaskedBits, since the former may call back into the latter. This fixes a major compile time problem on a testcase that happnened to hit this in a particularly bad way, PR4643. llvm-svn: 78023
-
- Aug 03, 2009
-
-
Bob Wilson authored
llvm-svn: 77982
-
Sanjiv Gupta authored
llvm-svn: 77974
-
Benjamin Kramer authored
llvm_report_error already prints "LLVM ERROR:". So stop reporting errors like "LLVM ERROR: llvm: error:" or "LLVM ERROR: ERROR:". llvm-svn: 77971
-
- Aug 02, 2009
-
-
Dan Gohman authored
support. This isn't immediately interesting, because Legalize ends up lowering SELECT_CC if the target doesn't support it, but this simplifies the process. Also, if the SELECT_CC would be expanded in Legalize, it can potentially end up with two copies of the condition expression. By leaving it as SELECT+SETCC, the SELECT can be expanded into two SELECTs that use a single SETCC. The two comparisons are usually CSE'd, but depending on when various expressions get legalized, the comparison expression could involve calls to library functions, such that the comparison expression may not be able to be CSE'd. This will be needed by a future patch. llvm-svn: 77896
-
- Aug 01, 2009
-
-
Dan Gohman authored
actually characters. llvm-svn: 77794
-
Dan Gohman authored
llvm-svn: 77774
-
Dan Gohman authored
llvm-svn: 77769
-
Dan Gohman authored
as it is now a MachineFunctionPass, and MachineFunctionPass now handles this. llvm-svn: 77760
-
Dan Gohman authored
to the MachineFunction. llvm-svn: 77753
-
Dan Gohman authored
llvm-svn: 77752
-
Bob Wilson authored
in SelectionDAGLowering::visitTargetIntrinsic. This removes a bit of special-case code for vector types. After staring at it for a while, I managed to convince myself that it is not necessary. The only case where TLI.getValueType() differs from MVT::getMVT is for iPTR, so this code could potentially make a difference for a vector of pointers. But, it looks like that is not supported. Calling TLI.getValueType() on a vector of pointers leads to the following sequence of calls: TargetLowering::getValueType MVT::getMVT MVT::getVectorVT(iPTR, num elements) MVT::getExtendedVectorVT MVT::getTypeForMVT for iPTR assertion fails "Type is not extended!" So, unless I'm really missing something, this bit of code is irrelevant to the current version of LLVM, which is consistent with the fact that I don't see this code in other similar places. llvm-svn: 77747
-
- Jul 31, 2009
-
-
Owen Anderson authored
metadata related, which I'm waiting on to avoid conflicting with Devang. llvm-svn: 77721
-
Dan Gohman authored
shouldn't do AU.setPreservesCFG(), because even though CodeGen passes don't modify the LLVM IR CFG, they may modify the MachineFunction CFG, and passes like MachineLoop are registered with isCFGOnly set to true. llvm-svn: 77691
-
Owen Anderson authored
llvm-svn: 77685
-
Daniel Dunbar authored
failures when building assorted projects with clang. --- Reverse-merging r77654 into '.': U include/llvm/CodeGen/Passes.h U include/llvm/CodeGen/MachineFunctionPass.h U include/llvm/CodeGen/MachineFunction.h U include/llvm/CodeGen/LazyLiveness.h U include/llvm/CodeGen/SelectionDAGISel.h D include/llvm/CodeGen/MachineFunctionAnalysis.h U include/llvm/Function.h U lib/Target/CellSPU/SPUISelDAGToDAG.cpp U lib/Target/PowerPC/PPCISelDAGToDAG.cpp U lib/CodeGen/LLVMTargetMachine.cpp U lib/CodeGen/MachineVerifier.cpp U lib/CodeGen/MachineFunction.cpp U lib/CodeGen/PrologEpilogInserter.cpp U lib/CodeGen/MachineLoopInfo.cpp U lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp D lib/CodeGen/MachineFunctionAnalysis.cpp D lib/CodeGen/MachineFunctionPass.cpp U lib/CodeGen/LiveVariables.cpp llvm-svn: 77661
-
Dan Gohman authored
mechanism. To support this, make MachineFunctionPass a little more complete. llvm-svn: 77654
-
Owen Anderson authored
llvm-svn: 77635
-
- Jul 30, 2009
-
-
Sanjiv Gupta authored
Allow targets to define libcall names for mem(cpy,set,move) intrinsics, rather than hardcoding them in DAG lowering. llvm-svn: 77586
-
Evan Cheng authored
Optimize some common usage patterns of atomic built-ins __sync_add_and_fetch() and __sync_sub_and_fetch. When the return value is not used (i.e. only care about the value in the memory), x86 does not have to use add to implement these. Instead, it can use add, sub, inc, dec instructions with the "lock" prefix. This is currently implemented using a bit of instruction selection trick. The issue is the target independent pattern produces one output and a chain and we want to map it into one that just output a chain. The current trick is to select it into a merge_values with the first definition being an implicit_def. The proper solution is to add new ISD opcodes for the no-output variant. DAG combiner can then transform the node before it gets to target node selection. Problem #2 is we are adding a whole bunch of x86 atomic instructions when in fact these instructions are identical to the non-lock versions. We need a way to add target specific information to target nodes and have this information carried over to machine instructions. Asm printer (or JIT) can use this information to add the "lock" prefix. llvm-svn: 77582
-
Owen Anderson authored
llvm-svn: 77516
-
- Jul 29, 2009
-
-
Chris Lattner authored
now that TargetOperandInfo does the heavy lifting. llvm-svn: 77508
-
Benjamin Kramer authored
llvm-svn: 77495
-
Owen Anderson authored
llvm-svn: 77494
-
- Jul 28, 2009
-
-
Owen Anderson authored
llvm-svn: 77366
-
Owen Anderson authored
llvm-svn: 77347
-
Chris Lattner authored
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
-
- Jul 27, 2009
-
-
Owen Anderson authored
llvm-svn: 77247
-
Eli Friedman authored
change. llvm-svn: 77171
-
- Jul 26, 2009
-
-
Daniel Dunbar authored
llvm-svn: 77148
-
- Jul 25, 2009
-
-
Dan Gohman authored
llvm-svn: 77039
-