[llvm] [mlir] [Support] mmap when possible in getSTDIN. (PR #162013)
James Henderson via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 14 01:45:37 PDT 2026
https://github.com/jh7370 commented:
Honestly, memory mapped files versus traditional file reading is not an area I'm a big expert in and I don't feel I can give meaningful input to that aspect of discussion. I think you're going to need to look to others for useful advice on this topic.
In response to the comments about the old Phabricator change:
> But I am not really sure why he modify the MemoryBuffer instead of check the end of the buffer in LLLexer.
Looking at the old review, it looked like LLLexer would require quite a bit of modification to remove the need for the trailing null. I do think it is probably the right thing to do however, purely based on gut and looking at the history. I think preserving that behaviour is just incurring more technical debt and making the rest of the code worse. I've added @MatzeB as a reviewer in case they can provide any further comment. I appreciate that the original change was over 10 years ago though...!
https://github.com/llvm/llvm-project/pull/162013
More information about the llvm-commits
mailing list