summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AMDGPU/AMDGPUAnnotateKernelFeatures.cpp
Commit message (Collapse)AuthorAgeFilesLines
* AMDGPU: Annotate necessity of flat-scratch-initMatt Arsenault2017-07-181-2/+17
| | | | | | | | As an approximation of the existing handling to avoid regressions. Fixes using too many registers with calls on subtargets with the SGPR allocation bug. llvm-svn: 308326
* AMDGPU: Annotate features from x work item/group IDs.Matt Arsenault2017-07-171-6/+17
| | | | | | | | This wasn't necessary before since they are always enabled for kernels, but this is necessary if they need to be forwarded to a callable function. llvm-svn: 308226
* [AMDGPU] Throw away more dead code. NFCI.Davide Italiano2017-07-141-16/+0
| | | | llvm-svn: 308055
* [AMDGPU] Garbage collect dead code. NFCI.Davide Italiano2017-07-141-16/+0
| | | | | | Unbreaks the build with GCC7. llvm-svn: 308047
* AMDGPU: Detect kernarg segment pointerMatt Arsenault2017-07-141-1/+5
| | | | | | | | This is necessary to pass the kernarg segment pointer to callee functions. Also don't unconditionally enable for kernels. llvm-svn: 307978
* AMDGPU: Annotate call graph with used featuresMatt Arsenault2017-07-131-67/+143
| | | | | | | Previously this wouldn't detect used features indirectly used in callee functions. llvm-svn: 307967
* [LegacyPassManager] Remove TargetMachine constructorsFrancis Visoiu Mistrih2017-05-181-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This provides a new way to access the TargetMachine through TargetPassConfig, as a dependency. The patterns replaced here are: * Passes handling a null TargetMachine call `getAnalysisIfAvailable<TargetPassConfig>`. * Passes not handling a null TargetMachine `addRequired<TargetPassConfig>` and call `getAnalysis<TargetPassConfig>`. * MachineFunctionPasses now use MF.getTarget(). * Remove all the TargetMachine constructors. * Remove INITIALIZE_TM_PASS. This fixes a crash when running `llc -start-before prologepilog`. PEI needs StackProtector, which gets constructed without a TargetMachine by the pass manager. The StackProtector pass doesn't handle the case where there is no TargetMachine, so it segfaults. Related to PR30324. Differential Revision: https://reviews.llvm.org/D33222 llvm-svn: 303360
* [AMDGPU] Get address space mapping by target triple environmentYaxun Liu2017-03-271-15/+22
| | | | | | | | | | | | | | | | | | As we introduced target triple environment amdgiz and amdgizcl, the address space values are no longer enums. We have to decide the value by target triple. The basic idea is to use struct AMDGPUAS to represent address space values. For address space values which are not depend on target triple, use static const members, so that they don't occupy extra memory space and is equivalent to a compile time constant. Since the struct is lightweight and cheap, it can be created on the fly at the point of usage. Or it can be added as member to a pass and created at the beginning of the run* function. Differential Revision: https://reviews.llvm.org/D31284 llvm-svn: 298846
* AMDGPU: Merge initial gfx9 supportMatt Arsenault2017-02-181-4/+9
| | | | llvm-svn: 295554
* AMDGPU : Add trap handler support.Wei Ding2017-02-101-1/+2
| | | | | | Differential Revision: http://reviews.llvm.org/D26010 llvm-svn: 294692
* AMDGPU : Add trap handler support.Wei Ding2017-01-241-1/+2
| | | | llvm-svn: 292893
* Use StringRef in Pass/PassManager APIs (NFC)Mehdi Amini2016-10-011-1/+1
| | | | llvm-svn: 283004
* AMDGPU/SI: Add support for triples with the mesa3d operating systemTom Stellard2016-09-161-1/+1
| | | | | | | | | | | | | | Summary: mesa3d will use the same kernel calling convention as amdhsa, but it will handle everything else like the default 'unknown' OS type. Reviewers: arsenm Subscribers: arsenm, llvm-commits, kzhuravl Differential Revision: https://reviews.llvm.org/D22783 llvm-svn: 281779
* AMDGPU: Prune includesMatt Arsenault2016-08-111-0/+1
| | | | llvm-svn: 278391
* AMDGPU: Add HSA dispatch id intrinsicMatt Arsenault2016-07-221-1/+2
| | | | llvm-svn: 276437
* AMDGPU: Fix constantexpr addrspacecastsMatt Arsenault2016-06-061-3/+67
| | | | | | | | If we had a constant group address space cast the queue pointer wasn't enabled for the function, resulting in a crash on noreg later. llvm-svn: 271935
* AMDGPU: Implement addrspacecastMatt Arsenault2016-04-251-5/+33
| | | | llvm-svn: 267452
* AMDGPU: Add queue ptr intrinsicMatt Arsenault2016-04-251-1/+2
| | | | llvm-svn: 267451
* AMDGPU: Stop checking intrinsics not used by HSA for dispatch-ptrMatt Arsenault2016-01-301-9/+4
| | | | | | | | Only the dispatch.ptr intrinsic is supposed to be used now to get the workgroup size, and the read.local.size intrinsics do not work correctly. llvm-svn: 259296
* AMDGPU: Add new amdgcn workitem intrinsicsMatt Arsenault2016-01-301-0/+6
| | | | | | | These use the correct prefix and follow the HSA naming convention rather than the config register option names. llvm-svn: 259293
* AMDGPU: Add llvm.amdgcn.dispatch.ptr intrinsicTom Stellard2015-11-261-1/+2
| | | | | | | | | | | | | | Summary: This returns a pointer to the dispatch packet, which can be used to load information about the kernel dispach. Reviewers: arsenm Subscribers: arsenm, llvm-commits Differential Revision: http://reviews.llvm.org/D14898 llvm-svn: 254116
* AMDGPU: Add pass to detect used kernel featuresMatt Arsenault2015-11-061-0/+125
Mark kernels that use certain features that require user SGPRs to support with kernel attributes. We need to know before instruction selection begins because it impacts the kernel calling convention lowering. For now this only detects the workitem intrinsics. llvm-svn: 252323
OpenPOWER on IntegriCloud