[llvm] r236009 - Add a fixme to resetTargetOptions to explain why it needs to go

Eric Christopher echristo at gmail.com
Tue Apr 28 11:09:05 PDT 2015


Author: echristo
Date: Tue Apr 28 13:09:05 2015
New Revision: 236009

URL: http://llvm.org/viewvc/llvm-project?rev=236009&view=rev
Log:
Add a fixme to resetTargetOptions to explain why it needs to go
away.

Modified:
    llvm/trunk/lib/Target/TargetMachine.cpp

Modified: llvm/trunk/lib/Target/TargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetMachine.cpp?rev=236009&r1=236008&r2=236009&view=diff
==============================================================================
--- llvm/trunk/lib/Target/TargetMachine.cpp (original)
+++ llvm/trunk/lib/Target/TargetMachine.cpp Tue Apr 28 13:09:05 2015
@@ -54,6 +54,11 @@ TargetMachine::~TargetMachine() {
 }
 
 /// \brief Reset the target options based on the function's attributes.
+// FIXME: This function needs to go away for a number of reasons:
+// a) global state on the TargetMachine is terrible in general,
+// b) there's no default state here to keep,
+// c) these target options should be passed only on the function
+//    and not on the TargetMachine (via TargetOptions) at all.
 void TargetMachine::resetTargetOptions(const Function &F) const {
 #define RESET_OPTION(X, Y)                                                     \
   do {                                                                         \





More information about the llvm-commits mailing list