https://llvm.org/bugs/show_bug.cgi?id=27361

            Bug ID: 27361
           Summary: TargetMachine is not thread safe (but it really should
                    be)
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Target Description Classes
          Assignee: unassignedb...@nondot.org
          Reporter: dav...@freebsd.org
                CC: llvm-bugs@lists.llvm.org
    Classification: Unclassified

When doing parallel CodeGen we currently have to create a TargetMachine
per-thread because TargetMachine is not thread-safe.
This is a waste, and it would be nice if it can be avoided. 
Also, having an immutable TargetMachine is a preliminary step needed if we want
at some point parallelize the backend.

Eric pointed out the least amount of work needed:
* Handle resetTargetOptions first (at least)
* An optional lock on getSubtarget

The subtarget itself should be fine, and if not, it should be fixed.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to