kparzysz-quic commented on PR #83:
URL: https://github.com/apache/tvm-rfcs/pull/83#issuecomment-1180408342

   > > The reason is that ParseIR needs to make calls to LLVM functions to 
create the llvm::Module.
   > 
   > I get this part, my main question is whether we can initializeLLVM in the 
Target constructor but do option resetting in enter/exit, i could miss 
something here.
   
   I see what you mean.  My concern is that since command line options can be 
used almost everywhere in LLVM (not just optimizations or code generation), we 
should try to do the saving as early as possible (and restoring as late as 
possible).  Ideally all the LLVM calls in the program would be enclosed in the 
save/restore functions (even the bitcode reader registers a couple of command 
line flags).
   
   At the same time we could make a deliberate decision to only apply the 
save/restore to a part of LLVM functionality, i.e. allow some kinds of LLVM 
function calls to happen outside of the save/restore scope.  Let me know what 
you think.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to