[llvm] r353899 - AMDGPU: Ignore CodeObjectV3 when inlining
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 12 15:30:11 PST 2019
Author: arsenm
Date: Tue Feb 12 15:30:11 2019
New Revision: 353899
URL: http://llvm.org/viewvc/llvm-project?rev=353899&view=rev
Log:
AMDGPU: Ignore CodeObjectV3 when inlining
This was inhibiting inlining of library functions when clang was
invoking the inliner directly. This is covering a bit of a mess with
subtarget feature handling, and this shouldn't be a subtarget
feature. The behavior is different depending on whether you are using
a -mattr flag in clang, or llc, opt.
Modified:
llvm/trunk/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h
llvm/trunk/test/Transforms/Inline/AMDGPU/inline-target-cpu.ll
Modified: llvm/trunk/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h?rev=353899&r1=353898&r2=353899&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h (original)
+++ llvm/trunk/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h Tue Feb 12 15:30:11 2019
@@ -84,6 +84,7 @@ class GCNTTIImpl final : public BasicTTI
AMDGPU::FeatureSGPRInitBug,
AMDGPU::FeatureXNACK,
AMDGPU::FeatureTrapHandler,
+ AMDGPU::FeatureCodeObjectV3,
// Perf-tuning features
AMDGPU::FeatureFastFMAF32,
Modified: llvm/trunk/test/Transforms/Inline/AMDGPU/inline-target-cpu.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/Inline/AMDGPU/inline-target-cpu.ll?rev=353899&r1=353898&r2=353899&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/Inline/AMDGPU/inline-target-cpu.ll (original)
+++ llvm/trunk/test/Transforms/Inline/AMDGPU/inline-target-cpu.ll Tue Feb 12 15:30:11 2019
@@ -78,6 +78,17 @@ define i32 @call_func_without_loadstoreo
ret i32 %call
}
+define i32 @enable_codeobjectv3() #10 {
+ ret i32 999
+}
+
+; CHECK-LABEL: @disable_codeobjectv3_call_codeobjectv3(
+; CHECK-NEXT: ret i32 999
+define i32 @disable_codeobjectv3_call_codeobjectv3() #11 {
+ %call = call i32 @enable_codeobjectv3()
+ ret i32 %call
+}
+
attributes #0 = { nounwind }
attributes #1 = { nounwind "target-cpu"="fiji" }
attributes #2 = { nounwind "target-cpu"="fiji" "target-features"="+fp32-denormals" }
@@ -88,3 +99,5 @@ attributes #6 = { nounwind "target-featu
attributes #7 = { nounwind "target-features"="+half-rate-64-ops" }
attributes #8 = { nounwind "target-features"="-load-store-opt" }
attributes #9 = { nounwind "target-features"="+load-store-opt" }
+attributes #10 = { nounwind "target-features"="+code-object-v3" }
+attributes #11 = { nounwind "target-features"="-code-object-v3" }
More information about the llvm-commits
mailing list