summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PTX/PTXISelLowering.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove the PTX back-end and all of its artifacts (triple, etc.)Justin Holewinski2012-05-241-516/+0
| | | | | | | | This back-end was deprecated in favor of the NVPTX back-end. NV_CONTRIB llvm-svn: 157417
* Convert more uses of XXXRegisterClass to &XXXRegClass. No functional change ↵Craig Topper2012-04-201-26/+20
| | | | | | since they are equivalent. llvm-svn: 155188
* PTX: Fix predicate logic bugJustin Holewinski2012-03-241-21/+31
| | | | | | | | | | | | | | | | | | | | | | Code such as: %vreg100 = setcc %vreg10, -1, SETNE brcond %vreg10, %tgt was being incorrectly morphed into %vreg100 = and %vreg10, 1 brcond %vreg10, %tgt where the 'and' instruction could be eliminated since such logic is on 1-bit types in the PTX back-end, leaving us with just: brcond %vreg10, %tgt which essentially gives us inverted branch conditions. llvm-svn: 153364
* Reorder includes in Target backends to following coding standards. Remove ↵Craig Topper2012-03-171-1/+1
| | | | | | some superfluous forward declarations. llvm-svn: 152997
* Re-commit r151623 with fix. Only issue special no-return calls if it's a ↵Evan Cheng2012-02-281-1/+1
| | | | | | direct call. llvm-svn: 151645
* Revert r151623 "Some ARM implementaions, e.g. A-series, does return stack ↵Daniel Dunbar2012-02-281-1/+1
| | | | | | prediction. ...", it is breaking the Clang build during the Compiler-RT part. llvm-svn: 151630
* Some ARM implementaions, e.g. A-series, does return stack prediction. That is,Evan Cheng2012-02-281-1/+1
| | | | | | | | | | | | | | | | | the processor keeps a return addresses stack (RAS) which stores the address and the instruction execution state of the instruction after a function-call type branch instruction. Calling a "noreturn" function with normal call instructions (e.g. bl) can corrupt RAS and causes 100% return misprediction so LLVM should use a unconditional branch instead. i.e. mov lr, pc b _foo The "mov lr, pc" is issued in order to get proper backtrace. rdar://8979299 llvm-svn: 151623
* Make all pointers to TargetRegisterClass const since they are all pointers ↵Craig Topper2012-02-221-18/+11
| | | | | | to static data that should not be modified. llvm-svn: 151134
* More dead code removal (using -Wunreachable-code)David Blaikie2012-01-201-1/+0
| | | | llvm-svn: 148578
* PTX: Continue to fix up the register mess.Justin Holewinski2011-12-061-2/+33
| | | | llvm-svn: 145947
* PTX: Let LLVM use loads/stores for all mem* intrinsics, instead of relying ↵Justin Holewinski2011-11-141-0/+5
| | | | | | on custom implementations. llvm-svn: 144551
* allow non-device function calls in PTX when natively handling device-side printfDan Bailey2011-11-111-20/+82
| | | | llvm-svn: 144388
* PTX: Print .ptr kernel attributes if PTX version >= 2.2Justin Holewinski2011-10-091-0/+6
| | | | llvm-svn: 141508
* PTX: Fixup a case where getRegClassFor() should be used instead of custom code.Justin Holewinski2011-10-051-17/+1
| | | | llvm-svn: 141199
* Remove a bunch of unused variables in the PTX backend (warned about by gcc-4.6).Duncan Sands2011-10-051-25/+7
| | | | llvm-svn: 141182
* PTX: MC-ize the PTX back-end (patch 1 of N)Justin Holewinski2011-09-281-5/+7
| | | | | | | | Lay some groundwork for converting to MC-based asm printer. This is the first of probably many patches to bring the back-end back up-to-date with all of the recent MC changes. llvm-svn: 140697
* PTX: Simplify code. No functionality change.Benjamin Kramer2011-09-281-13/+5
| | | | llvm-svn: 140680
* PTX: Pass param name strings per const reference.Benjamin Kramer2011-09-281-4/+4
| | | | | | The copies caused use-after-free bugs on std::string implementations without COW (i.e. anything but libstdc++) llvm-svn: 140679
* PTX: Use external symbols to keep track of params and locals. This also fixesJustin Holewinski2011-09-271-12/+21
| | | | | | | a couple of outstanding issues with frame objects occuring as instruction operands. llvm-svn: 140616
* PTX: Cleanup unused code in PTXMachineFunctionInfoJustin Holewinski2011-09-231-54/+7
| | | | llvm-svn: 140390
* PTX: Handle function call return valuesJustin Holewinski2011-09-231-9/+31
| | | | llvm-svn: 140386
* PTX: Start fixing function callsJustin Holewinski2011-09-231-1/+3
| | | | llvm-svn: 140378
* PTX: Generalize handling of .param typesJustin Holewinski2011-09-231-5/+11
| | | | llvm-svn: 140375
* PTX: Remove physical register defsJustin Holewinski2011-09-221-6/+0
| | | | llvm-svn: 140310
* PTX: Use .param space for device function return values on SM 2.0+, and attemptJustin Holewinski2011-09-221-28/+101
| | | | | | to fix up parameter passing on SM < 2.0 llvm-svn: 140309
* PTX: Fix style issuesJustin Holewinski2011-09-221-21/+21
| | | | llvm-svn: 140308
* Add codegen support for vector select (in the IR this means a selectDuncan Sands2011-09-061-1/+2
| | | | | | | | | | | | with a vector condition); such selects become VSELECT codegen nodes. This patch also removes VSETCC codegen nodes, unifying them with SETCC nodes (codegen was actually often using SETCC for vector SETCC already). This ensures that various DAG combiner optimizations kick in for vector comparisons. Passes dragonegg bootstrap with no testsuite regressions (nightly testsuite as well as "make check-all"). Patch mostly by Nadav Rotem. llvm-svn: 139159
* Silence a bunch (but not all) "variable written but not read" warningsDuncan Sands2011-08-121-2/+2
| | | | | | when building with assertions disabled. llvm-svn: 137460
* PTX: Add initial support for device function callsJustin Holewinski2011-08-091-0/+49
| | | | | | - Calls are supported on SM 2.0+ for function with no return values llvm-svn: 137125
* Remove unused array.Duncan Sands2011-07-021-21/+0
| | | | llvm-svn: 134323
* PTX: Reverting implementation of i8.Dan Bailey2011-06-251-34/+40
| | | | | | | | The .b8 operations in PTX are far more limiting than I first thought. The mov operation isn't even supported, so there's no way of converting a .pred value into a .b8 without going via .b16, which is not sensible. An improved implementation needs to use the fact that loads and stores automatically extend and truncate to implement support for EXTLOAD and TRUNCSTORE in order to correctly support boolean values. llvm-svn: 133873
* PTX: Add support for i8 type and introduce associated .b8 registersDan Bailey2011-06-241-1/+16
| | | | | | The i8 type is required for boolean values, but can only use ld, st and mov instructions. The i1 type continues to be used for predicates. llvm-svn: 133814
* PTX: Re-work target sm/compute selection and add some basic GPUJustin Holewinski2011-06-241-1/+1
| | | | | | targets: g80, gt200, gf100(fermi) llvm-svn: 133799
* PTX: Always use registers for return values, but use .param space for deviceJustin Holewinski2011-06-231-32/+18
| | | | | | | | | | | parameters if SM >= 2.0 - Update test cases to be more robust against register allocation changes - Bump up the number of registers to 128 per type - Include Python script to re-generate register file with any number of registers llvm-svn: 133736
* PTX: Whitespace fixes and remove commented out codeJustin Holewinski2011-06-231-1/+0
| | | | llvm-svn: 133734
* PTX: Prevent DCE from eliminating st.param calls, and unify the handling ofJustin Holewinski2011-06-231-4/+4
| | | | | | | st.param and ld.param FIXME: Test cases still need to be updated llvm-svn: 133733
* PTX: Use .param space for parameters in device functions for SM >= 2.0Justin Holewinski2011-06-231-17/+44
| | | | | FIXME: DCE is eliminating the final st.param.x calls, figure out why llvm-svn: 133732
* PTX: Finish new calling convention implementationJustin Holewinski2011-06-161-70/+101
| | | | llvm-svn: 133172
* PTX: Rename register classes for readability and combine int and fp registersJustin Holewinski2011-06-161-16/+16
| | | | llvm-svn: 133171
* PTX: Fix whitespace errorsJustin Holewinski2011-06-161-9/+9
| | | | llvm-svn: 133158
* Make the logic for determining function alignment more explicit. No ↵Eli Friedman2011-05-061-1/+3
| | | | | | functionality change. llvm-svn: 131012
* PTX: support for select_cc and fixes for setccJustin Holewinski2011-04-281-0/+36
| | | | | | | | | | - expansion of SELECT_CC into SETCC - force SETCC result type to i1 - custom selection for handling i1 using SETCC Patch by Dan Bailey llvm-svn: 130358
* PTX: support for zext loads and trunc storesJustin Holewinski2011-04-281-1/+13
| | | | | | | | - expansion of EXTLOAD and TRUNCSTORE instructions Patch by Dan Bailey llvm-svn: 130354
* ptx: clean up branch code a bitChe-Liang Chiou2011-03-281-2/+0
| | | | llvm-svn: 128405
* PTX: Improve support for 64-bit addressingJustin Holewinski2011-03-231-1/+4
| | | | | | | | | - Fix bug in ADDRrr/ADDRri/ADDRii selection for 64-bit addresses - Add comparison selection for i64 - Add zext selection for i32 -> i64 - Add shl/shr/sha support for i64 llvm-svn: 128153
* PTX: Fix various codegen issuesJustin Holewinski2011-03-181-1/+10
| | | | | | | | - Emit mad instead of mad.rn for shader model 1.0 - Emit explicit mov.u32 instructions for reading global variables - (most PTX instructions cannot take global variable immediates) llvm-svn: 127895
* ptx: add unconditional and conditional branchChe-Liang Chiou2011-03-181-2/+9
| | | | llvm-svn: 127873
* Avoid a compiler warning about reg possibly being used uninitializedDuncan Sands2011-03-151-4/+2
| | | | | | when building with assertions disabled. llvm-svn: 127675
* Extend initial support for primitive types in PTX backendChe-Liang Chiou2011-03-021-7/+24
| | | | | | | | | | | | | | - Allow i16, i32, i64, float, and double types, using the native .u16, .u32, .u64, .f32, and .f64 PTX types. - Allow loading/storing of all primitive types. - Allow primitive types to be passed as parameters. - Allow selection of PTX Version and Shader Model as sub-target attributes. - Merge integer/floating-point test cases for load/store. - Use .u32 instead of .s32 to conform to output from NVidia nvcc compiler. Patch by Justin Holewinski llvm-svn: 126824
* Add preliminary support for .f32 in the PTX backend.Che-Liang Chiou2011-02-281-5/+17
| | | | | | | | | | | | - Add appropriate TableGen patterns for fadd, fsub, fmul. - Add .f32 as the PTX type for the LLVM float type. - Allow parameters, return values, and global variable declarations to accept the float type. - Add appropriate test cases. Patch by Justin Holewinski llvm-svn: 126636
OpenPOWER on IntegriCloud