- const char* args[] = {
- "llvmForJSC.dylib",
- "-enable-patchpoint-liveness=true"
- };
- llvm::cl::ParseCommandLineOptions(sizeof(args) / sizeof(const char*), args);
+#if LLVM_VERSION_MAJOR >= 4 || (LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR >= 6)
+ // It's OK to have fast ISel, if it was requested.
+#else
+ // We don't have enough support for fast ISel. Disable it.
+ *enableFastISel = false;
+#endif
+
+ if (*enableFastISel)
+ initCommandLine("llvmForJSC.dylib", "-enable-misched=false", "-regalloc=basic");
+ else
+ initCommandLine("llvmForJSC.dylib", "-enable-patchpoint-liveness=true");