mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-20 16:17:38 +00:00
Expose "noduplicate" attribute as a property for intrinsics.
The "noduplicate" function attribute exists to prevent certain optimizations from duplicating calls to the function. This is important on platforms where certain function call duplications are unsafe (for example execution barriers for CUDA and OpenCL). This patch makes it possible to specify intrinsics as "noduplicate" and translates that to the appropriate function attribute. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204200 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -446,6 +446,7 @@ CodeGenIntrinsic::CodeGenIntrinsic(Record *R) {
|
||||
isCommutative = false;
|
||||
canThrow = false;
|
||||
isNoReturn = false;
|
||||
isNoDuplicate = false;
|
||||
|
||||
if (DefName.size() <= 4 ||
|
||||
std::string(DefName.begin(), DefName.begin() + 4) != "int_")
|
||||
@@ -570,6 +571,8 @@ CodeGenIntrinsic::CodeGenIntrinsic(Record *R) {
|
||||
isCommutative = true;
|
||||
else if (Property->getName() == "Throws")
|
||||
canThrow = true;
|
||||
else if (Property->getName() == "IntrNoDuplicate")
|
||||
isNoDuplicate = true;
|
||||
else if (Property->getName() == "IntrNoReturn")
|
||||
isNoReturn = true;
|
||||
else if (Property->isSubClassOf("NoCapture")) {
|
||||
|
||||
Reference in New Issue
Block a user