Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Target/PowerPC/PPCInstrInfo.cpp | ||
---|---|---|
2016 | Here, do you mean cache line size? | |
2127 | Ditto. |
Please be a bit more careful to ensure that comments are complete sentences with the expected punctuation, etc. Also, if your editor doesn't automatically format your code, consider running the patch through clang-format-diff.
lib/Target/PowerPC/PPCInstrInfo.cpp | ||
---|---|---|
1937 | What is the use of the string parameter? | |
1940 | Naming convention. | |
1950 | "...are instructions are..." -> "... instructions are..." | |
1953 | Please fix the formatting in this comment. I believe we should send out an RFC on llvm-dev to provide a new property for intrinsics that specifies that they have side-effects but do not touch memory. We have such a flag for instructions, I think it makes sense to have it for intrinsics as well. If we do that, I believe this comment should include a FIXME to remove this function once such a property exists and is used correctly in the PPC back end in all instances where it should be used. | |
1957 | Why can't SDNode::getGluedNode() be used for this purpose and eliminate the need for this function? | |
1959 | Is the operand you're after not guaranteed to be the very last operand? | |
1965 | Why is this needed? It seems that the above loop has terminated either when it has gone over all the operands (caught by previous assert) or when it found an operand whose type is MVT::Glue (whose type you check in this assert again). I think the weird structure of this function makes the logic more difficult to reason about than it needs to be. | |
1966 | Keep in mind that you'll be returning something that you probably don't want to return (i.e. what you would assert on) in a no-asserts build. | |
1992 | Text for the assert. | |
2001 | tlat -> that | |
2015 | Why? | |
2016 | I agree. If we mean cache line size, we should check the cache line size. If we don't have accurate information about the cache line size for the common processors in the TTI implementation, we should update the implementation. | |
2037 | This assert is unnecessary. Already exists in getImm(). | |
2099 | I think you may have physical registers at this point for TOC based loads (i.e. X2/R2 may already be part of the instruction at this point). It would make sense to look into whether this is the case and if it is, we should handle physical registers. Other than that, I don't see any compelling need to handle physical registers here. | |
2102 | I am probably missing something here so it's a good indication that a detailed comment is in order... | |
2103 | This line looks way too long. | |
2106 | A comment as to why we're exiting here. | |
lib/Target/PowerPC/PPCInstrInfo.h | ||
52 | Please refrain from unrelated formatting changes. | |
183 | "... a used..." -> "... used ..." | |
204 | Sentence fragment in comment, please revise. |
Please refrain from unrelated formatting changes.