summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MCA/InstrBuilder.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [MCA] Fix a spelling mistake in a comment. NFCGreg Bedwell2019-10-271-1/+1
|
* [MCA] consistently use MCPhysReg instead of unsigned as register type. NFCIAndrea Di Biagio2019-08-221-6/+4
| | | | llvm-svn: 369648
* [llvm] Migrate llvm::make_unique to std::make_uniqueJonas Devlieghere2019-08-151-2/+2
| | | | | | | | Now that we've moved to C++14, we no longer need the llvm::make_unique implementation from STLExtras.h. This patch is a mechanical replacement of (hopefully) all the llvm::make_unique instances across the monorepo. llvm-svn: 369013
* [MCA] Slightly refactor the logic in ResourceManager. NFCIAndrea Di Biagio2019-08-151-18/+12
| | | | | | | | This patch slightly changes the API in the attempt to simplify resource buffer queries. It is done in preparation for a patch that will enable support for macro fusion. llvm-svn: 368994
* [MCA] Ignore invalid processor resource writes of zero cycles. NFCIAndrea Di Biagio2019-06-141-2/+14
| | | | | | | | In debug mode, the tool also raises a warning and prints out a message which helps identify the problematic MCWriteProcResEntry from the scheduling class. This message would have been useful to have when triaging PR42282. llvm-svn: 363387
* [MCA] Remove dead assignment. NFCAndrea Di Biagio2019-05-081-1/+0
| | | | llvm-svn: 360237
* [MCA] Correctly update the UsedResourceGroups mask in the InstrBuilder.Andrea Di Biagio2019-03-261-0/+1
| | | | | | | | Found by inspection when looking at the debug output of MCA. This problem was latent, and none of the upstream models were affected by it. No functional change intended. llvm-svn: 357000
* [MCA] Store a bitmask of used groups in the instruction descriptor.Andrea Di Biagio2019-02-131-4/+11
| | | | | | | This is to speedup 'checkAvailability' queries in class ResourceManager. No functional change intended. llvm-svn: 353949
* [MC][X86] Correctly model additional operand latency caused by transfer ↵Andrea Di Biagio2019-01-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | delays from the integer to the floating point unit. This patch adds a new ReadAdvance definition named ReadInt2Fpu. ReadInt2Fpu allows x86 scheduling models to accurately describe delays caused by data transfers from the integer unit to the floating point unit. ReadInt2Fpu currently defaults to a delay of zero cycles (i.e. no delay) for all x86 models excluding BtVer2. That means, this patch is only a functional change for the Jaguar cpu model only. Tablegen definitions for instructions (V)PINSR* have been updated to account for the new ReadInt2Fpu. That read is mapped to the the GPR input operand. On Jaguar, int-to-fpu transfers are modeled as a +6cy delay. Before this patch, that extra delay was added to the opcode latency. In practice, the insert opcode only executes for 1cy. Most of the actual latency is actually contributed by the so-called operand-latency. According to the AMD SOG for family 16h, (V)PINSR* latency is defined by expression f+1, where f is defined as a forwarding delay from the integer unit to the fpu. When printing instruction latency from MCA (see InstructionInfoView.cpp) and LLC (only when flag -print-schedule is speified), we now need to account for any extra forwarding delays. We do this by checking if scheduling classes declare any negative ReadAdvance entries. Quoting a code comment in TargetSchedule.td: "A negative advance effectively increases latency, which may be used for cross-domain stalls". When computing the instruction latency for the purpose of our scheduling tests, we now add any extra delay to the formula. This avoids regressing existing codegen and mca schedule tests. It comes with the cost of an extra (but very simple) hook in MCSchedModel. Differential Revision: https://reviews.llvm.org/D57056 llvm-svn: 351965
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* [MCA] Fix wrong definition of ResourceUnitMask in DefaultResourceStrategy.Andrea Di Biagio2019-01-101-5/+7
| | | | | | | | | | | | | | Field ResourceUnitMask was incorrectly defined as a 'const unsigned' mask. It should have been a 64 bit quantity instead. That means, ResourceUnitMask was always implicitly truncated to a 32 bit quantity. This issue has been found by inspection. Surprisingly, that bug was latent, and it never negatively affected any existing upstream targets. This patch fixes the wrong definition of ResourceUnitMask, and adds a bunch of extra debug prints to help debugging potential issues related to invalid processor resource masks. llvm-svn: 350820
* [llvm-mca] Display masks in hexEvandro Menezes2019-01-091-2/+3
| | | | | | Display the resources masks as hexadecimal. Otherwise, NFC. llvm-svn: 350777
* [llvm-mca] Improve debugging (NFC)Evandro Menezes2019-01-081-0/+3
| | | | llvm-svn: 350661
* [MCA] Improved handling of in-order issue/dispatch resources.Andrea Di Biagio2019-01-041-1/+11
| | | | | | | | | | | Added field 'MustIssueImmediately' to the instruction descriptor of instructions that only consume in-order issue/dispatch processor resources. This speeds up queries from the hardware Scheduler, and gives an average ~5% speedup on a release build. No functional change intended. llvm-svn: 350397
* [MCA] Add support for BeginGroup/EndGroup.Andrea Di Biagio2018-12-171-0/+2
| | | | llvm-svn: 349354
* [MCA] Don't assume that createMCInstrAnalysis() always returns a valid pointer.Andrea Di Biagio2018-12-171-8/+13
| | | | | | | | | | Class InstrBuilder wrongly assumed that llvm targets were always able to return a non-null pointer when createMCInstrAnalysis() was called on them. This was causing crashes when simulating executions for targets that don't provide an MCInstrAnalysis object. This patch fixes the issue by making MCInstrAnalysis optional. llvm-svn: 349352
* [llvm-mca] Move llvm-mca library to llvm/lib/MCA.Clement Courbet2018-12-171-0/+675
Summary: See PR38731. Reviewers: andreadb Subscribers: mgorny, javed.absar, tschuett, gbedwell, andreadb, RKSimon, llvm-commits Differential Revision: https://reviews.llvm.org/D55557 llvm-svn: 349332
OpenPOWER on IntegriCloud