summaryrefslogtreecommitdiff
path: root/src/jit/gtlist.h
diff options
context:
space:
mode:
authorMike Danes <onemihaid@hotmail.com>2018-06-04 00:50:17 +0300
committerMike Danes <onemihaid@hotmail.com>2018-06-04 21:37:48 +0300
commit9adb98520dbfd0e7790e232bd042799557b2c719 (patch)
tree22efa5f4f1861a57eae645025c8701d5908784cb /src/jit/gtlist.h
parent183113ec7a16d7bb000e880e5e1ce690aedc7715 (diff)
downloadcoreclr-9adb98520dbfd0e7790e232bd042799557b2c719.tar.gz
coreclr-9adb98520dbfd0e7790e232bd042799557b2c719.tar.bz2
coreclr-9adb98520dbfd0e7790e232bd042799557b2c719.zip
Cleanup LOCKADD handling
LOCKADD nodes are generated rather early and there's no reason for that: * The CORINFO_INTRINSIC_InterlockedAdd32/64 intrinsics are not actually used. Even if they would be used we can still import them as XADD nodes and rely on lowering to generate LOCKADD when needed. * gtExtractSideEffList transforms XADD into LOCKADD but this can be done in lowering. LOCKADD is an XARCH specific optimization after all. Additionally: * Avoid the need for special handling in LSRA by making GT_LOCKADD a "no value" oper. * Split LOCKADD codegen from XADD/XCHG codegen, attempting to use the same code for all 3 just makes things more complex. * The address is always in a register so there's no real need to create an indir node on the fly, the relevant emitter functions can be called directly. The last point above is actually a CQ issue - we always generate `add [reg], imm`, more complex address modes are not used. Unfortunately this problem starts early, when the importer spills the address to a local variable. If that ever gets fixed then we'll could probably generate a contained LEA in lowering.
Diffstat (limited to 'src/jit/gtlist.h')
-rw-r--r--src/jit/gtlist.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/jit/gtlist.h b/src/jit/gtlist.h
index dcfe3ba09c..bbd9bcbcd1 100644
--- a/src/jit/gtlist.h
+++ b/src/jit/gtlist.h
@@ -53,7 +53,7 @@ GTNODE(RELOAD , GenTreeCopyOrReload,0,GTK_UNOP)
GTNODE(ARR_LENGTH , GenTreeArrLen ,0,GTK_UNOP|GTK_EXOP) // array-length
GTNODE(INTRINSIC , GenTreeIntrinsic ,0,GTK_BINOP|GTK_EXOP) // intrinsics
-GTNODE(LOCKADD , GenTreeOp ,0,GTK_BINOP)
+GTNODE(LOCKADD , GenTreeOp ,0,GTK_BINOP|GTK_NOVALUE)
GTNODE(XADD , GenTreeOp ,0,GTK_BINOP)
GTNODE(XCHG , GenTreeOp ,0,GTK_BINOP)
GTNODE(CMPXCHG , GenTreeCmpXchg ,0,GTK_SPECIAL)