summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Hexagon/HexagonTargetMachine.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Move the global variables representing each Target behind accessor functionMehdi Amini2016-10-091-1/+1
| | | | | | | | This avoids "static initialization order fiasco" Differential Revision: https://reviews.llvm.org/D25412 llvm-svn: 283702
* [Hexagon] Change insertion of expand-condsets pass to avoid memory leaksKrzysztof Parzyszek2016-08-241-5/+6
| | | | llvm-svn: 279678
* [Hexagon] Generate vector printing instructionsRon Lieberman2016-08-011-0/+7
| | | | llvm-svn: 277370
* MachinePipeliner pass that implements Swing Modulo SchedulingBrendon Cahoon2016-07-291-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Software pipelining is an optimization for improving ILP by overlapping loop iterations. Swing Modulo Scheduling (SMS) is an implementation of software pipelining that attempts to reduce register pressure and generate efficient pipelines with a low compile-time cost. This implementaion of SMS is a target-independent back-end pass. When enabled, the pass should run just prior to the register allocation pass, while the machine IR is in SSA form. If the pass is successful, then the original loop is replaced by the optimized loop. The optimized loop contains one or more prolog blocks, the pipelined kernel, and one or more epilog blocks. This pass is enabled for Hexagon only. To enable for other targets, a couple of target specific hooks must be implemented, and the pass needs to be called from the target's TargetMachine implementation. Differential Review: http://reviews.llvm.org/D16829 llvm-svn: 277169
* [Hexagon] Implement MI-level constant propagationKrzysztof Parzyszek2016-07-281-0/+9
| | | | llvm-svn: 277028
* [Hexagon] Use loop data prefetch on HexagonKrzysztof Parzyszek2016-07-221-0/+6
| | | | llvm-svn: 276422
* [Hexagon] Do not create passes in the constructor of HexagonPassConfigKrzysztof Parzyszek2016-05-271-9/+5
| | | | | | | When running mir tests, a pass created in that constructor would not be freed, leading to memory leaks. llvm-svn: 271043
* Delete Reloc::Default.Rafael Espindola2016-05-181-5/+13
| | | | | | | | | | | | Having an enum member named Default is quite confusing: Is it distinct from the others? This patch removes that member and instead uses Optional<Reloc> in places where we have a user input that still hasn't been maped to the default value, which is now clear has no be one of the remaining 3 options. llvm-svn: 269988
* [Hexagon] Add a debug option to disable all backend optimizationsKrzysztof Parzyszek2016-05-111-1/+4
| | | | llvm-svn: 269192
* CodeGen: Move TargetPassConfig from Passes.h to an own header; NFCMatthias Braun2016-05-101-0/+1
| | | | | | | | Many files include Passes.h but only a fraction needs to know about the TargetPassConfig class. Move it into an own header. Also rename Passes.cpp to TargetPassConfig.cpp while we are at it. llvm-svn: 269011
* [Hexagon] Optimize addressing modes for load/storeKrzysztof Parzyszek2016-04-291-0/+7
| | | | | | Patch by Jyotsna Verma. llvm-svn: 268051
* [Hexagon] Implement branch relaxationKrzysztof Parzyszek2016-04-191-0/+3
| | | | | | Patch by Sirish Pande. llvm-svn: 266792
* [Hexagon] Remove HexagonExpandPredSpillCode passKrzysztof Parzyszek2016-02-121-4/+0
| | | | | | This code is dead. The expansion is now done in HexagonFrameLowering. llvm-svn: 260691
* [Hexagon] Specify vector alignment in DataLayout stringKrzysztof Parzyszek2016-02-121-7/+7
| | | | | | | | | | | The DataLayout can calculate alignment of vectors based on the alignment of the element type and the number of elements. In fact, it is the product of these two values. The problem is that for vectors of N x i1, this will return the alignment of N bytes, since the alignment of i1 is 8 bits. The vector types of vNi1 should be aligned to N bits instead. Provide explicit alignment for HVX vectors to avoid such complications. llvm-svn: 260678
* [Hexagon] Implement RDF-based post-RA optimizationsKrzysztof Parzyszek2016-01-121-2/+10
| | | | | | | | - Handle simple cases of register copies (what current RDF CP allows). - Hexagon-specific dead code elimination: handles dead address updates in post-increment instructions. llvm-svn: 257504
* [Hexagon] Subtarget features/default CPU correctionsKrzysztof Parzyszek2015-12-141-2/+3
| | | | llvm-svn: 255501
* [Hexagon] Bit-based instruction simplificationKrzysztof Parzyszek2015-10-201-0/+14
| | | | | | | Analyze bit patterns of operands and values of instructions to perform various simplifications, dead/redundant code elimination, etc. llvm-svn: 250868
* [Hexagon] Remove unnecessary argument sign extendsKrzysztof Parzyszek2015-10-191-0/+4
| | | | llvm-svn: 250724
* [Hexagon] Delay emission of CFI instructionsKrzysztof Parzyszek2015-10-191-0/+4
| | | | | | | Emit the CFI instructions after all code transformation have been done. This will avoid any interference between CFI instructions and packetization. llvm-svn: 250714
* [Hexagon] Split double registersKrzysztof Parzyszek2015-10-161-0/+7
| | | | llvm-svn: 250549
* [Hexagon] Delete lib/Target/Hexagon/HexagonRemoveSZExtArgs.cppKrzysztof Parzyszek2015-10-161-4/+0
| | | | llvm-svn: 250543
* [Hexagon] Merge adjacent storesKrzysztof Parzyszek2015-10-161-1/+8
| | | | llvm-svn: 250542
* [Hexagon] Add an early if-conversion passKrzysztof Parzyszek2015-10-061-0/+6
| | | | llvm-svn: 249423
* constify the Function parameter to the TTI creation callback andEric Christopher2015-09-161-1/+1
| | | | | | propagate to all callers/users/etc. llvm-svn: 247864
* Remove unnecessary includesMatt Arsenault2015-08-081-1/+0
| | | | llvm-svn: 244382
* [Hexagon] Implement TargetTransformInfo for HexagonKrzysztof Parzyszek2015-08-051-3/+36
| | | | | Author: Brendon Cahoon <bcahoon@codeaurora.org> llvm-svn: 244089
* [Hexagon] Generate MUX from conditional transfers when dot-new not possibleKrzysztof Parzyszek2015-07-201-0/+8
| | | | llvm-svn: 242711
* [Hexagon] Generate instructions for operations on predicate registersKrzysztof Parzyszek2015-07-141-0/+8
| | | | | | | Convert logical operations on general-purpose registers to the correspon- ding operations on predicate registers. llvm-svn: 242186
* [Hexagon] Generate "extract" instructions more aggressivelyKrzysztof Parzyszek2015-07-141-13/+18
| | | | | | | Generate extract instructions (via intrinsics) before the DAG combiner folds shifts into unrecognizable forms. llvm-svn: 242163
* [Hexagon] Add support for atomic RMW operationsKrzysztof Parzyszek2015-07-091-1/+2
| | | | llvm-svn: 241804
* [Hexagon] Implement commoning of GetElementPtr instructionsKrzysztof Parzyszek2015-07-081-0/+14
| | | | llvm-svn: 241714
* [Hexagon] Generate "insert" instructions more aggressivelyKrzysztof Parzyszek2015-07-081-1/+5
| | | | llvm-svn: 241683
* Revert 241681: causes Windows builds to failKrzysztof Parzyszek2015-07-081-5/+1
| | | | llvm-svn: 241682
* [Hexagon] Generate "insert" instructions more aggressivelyKrzysztof Parzyszek2015-07-081-1/+5
| | | | llvm-svn: 241681
* Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC)Alexander Kornienko2015-06-231-1/+1
| | | | | | Apparently, the style needs to be agreed upon first. llvm-svn: 240390
* Fixed/added namespace ending comments using clang-tidy. NFCAlexander Kornienko2015-06-191-1/+1
| | | | | | | | | | | | | The patch is generated using this command: tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py -fix \ -checks=-*,llvm-namespace-comment -header-filter='llvm/.*|clang/.*' \ llvm/lib/ Thanks to Eugene Kosov for the original patch! llvm-svn: 240137
* [Hexagon] Moving pass declarations out of header and in to implementation ↵Colin LeMahieu2015-06-151-1/+17
| | | | | | files. Removing unused function getSubtargetInfo from HexagonMCCodeEmitter.cpp Removing deletion of copy construction and assignment operator since parent already deletes it. llvm-svn: 239744
* Replace string GNU Triples with llvm::Triple in TargetMachine. NFC.Daniel Sanders2015-06-111-2/+2
| | | | | | | | | | | | | | | | | | Summary: For the moment, TargetMachine::getTargetTriple() still returns a StringRef. This continues the patch series to eliminate StringRef forms of GNU triples from the internals of LLVM that began in r239036. Reviewers: rengolin Reviewed By: rengolin Subscribers: ted, llvm-commits, rengolin, jholewinski Differential Revision: http://reviews.llvm.org/D10362 llvm-svn: 239554
* Replace string GNU Triples with llvm::Triple in MCSubtargetInfo and ↵Daniel Sanders2015-06-101-1/+1
| | | | | | | | | | | | | | | | | | create*MCSubtargetInfo(). NFC. Summary: This continues the patch series to eliminate StringRef forms of GNU triples from the internals of LLVM that began in r239036. Reviewers: rafael Reviewed By: rafael Subscribers: rafael, ted, jfb, llvm-commits, rengolin, jholewinski Differential Revision: http://reviews.llvm.org/D10311 llvm-svn: 239467
* Expand MUX instructions early on HexagonKrzysztof Parzyszek2015-03-311-4/+20
| | | | | | This time with all files included. llvm-svn: 233696
* Revert 233694. Weak SVN-fu.Krzysztof Parzyszek2015-03-311-20/+4
| | | | llvm-svn: 233695
* Expand MUX instructions early on HexagonKrzysztof Parzyszek2015-03-311-4/+20
| | | | llvm-svn: 233694
* Move the DataLayout to the generic TargetMachine, making it mandatory.Mehdi Amini2015-03-121-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: I don't know why every singled backend had to redeclare its own DataLayout. There was a virtual getDataLayout() on the common base TargetMachine, the default implementation returned nullptr. It was not clear from this that we could assume at call site that a DataLayout will be available with each Target. Now getDataLayout() is no longer virtual and return a pointer to the DataLayout member of the common base TargetMachine. I plan to turn it into a reference in a future patch. The only backend that didn't have a DataLayout previsouly was the CPPBackend. It now initializes the default DataLayout. This commit is NFC for all the other backends. Test Plan: clang+llvm ninja check-all Reviewers: echristo Subscribers: jfb, jholewinski, llvm-commits Differential Revision: http://reviews.llvm.org/D8243 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 231987
* Remove useMachineScheduler and replace it with subtarget optionsEric Christopher2015-03-111-14/+1
| | | | | | | | | | | | | that control, individually, all of the disparate things it was controlling. At the same time move a FIXME in the Hexagon port to a new subtarget function that will enable a user of the machine scheduler to avoid using the source scheduler for pre-RA-scheduling. The FIXME would have this removed, but involves either testcase changes or adding -pre-RA-sched=source to a few testcases. llvm-svn: 231980
* Hexagon: Remove pass that does nothing at allBenjamin Kramer2015-03-101-3/+0
| | | | llvm-svn: 231791
* [PM] Remove the old 'PassManager.h' header file at the top level ofChandler Carruth2015-02-131-1/+1
| | | | | | | | | | | | | | | | | | | | LLVM's include tree and the use of using declarations to hide the 'legacy' namespace for the old pass manager. This undoes the primary modules-hostile change I made to keep out-of-tree targets building. I sent an email inquiring about whether this would be reasonable to do at this phase and people seemed fine with it, so making it a reality. This should allow us to start bootstrapping with modules to a certain extent along with making it easier to mix and match headers in general. The updates to any code for users of LLVM are very mechanical. Switch from including "llvm/PassManager.h" to "llvm/IR/LegacyPassManager.h". Qualify the types which now produce compile errors with "legacy::". The most common ones are "PassManager", "PassManagerBase", and "FunctionPassManager". llvm-svn: 229094
* Remove unused class variables and update all callers/uses fromEric Christopher2015-02-021-2/+1
| | | | | | | the HexagonSplitTFRCondSet pass. Use the subtarget off the machine function at the same time. llvm-svn: 227878
* Migrate the HexagonSplitConst32AndConst64 pass from TargetMachineEric Christopher2015-02-021-3/+1
| | | | | | | based getSubtarget to the one cached on the MachineFunction. Remove unused class variables and update all callers/uses. llvm-svn: 227874
* Get TargetRegisterInfo and TargetInstrInfo off of the MachineFunctionEric Christopher2015-02-021-1/+1
| | | | | | and remove unnecessary class variables. llvm-svn: 227832
* Grab TargetInstrInfo off of the MachineFunction and removeEric Christopher2015-02-021-2/+1
| | | | | | unnecessary class variables. llvm-svn: 227830
OpenPOWER on IntegriCloud