I think there are more attributes, flags we can add to call, functions declarations and global variables. Let's start with these two flags.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
| llvm/lib/FuzzMutate/IRMutator.cpp | ||
|---|---|---|
| 222–224 | I don't know exactly how the fuzz argument works, but won't these interfere? Setting all is superfluous with setting every individual flag | |
| llvm/unittests/FuzzMutate/StrategiesTest.cpp | ||
| 330 | Separate ASSERT_TRUE for each | |
| 354 | Do we even allow fmf on arrays of vectors? | |
| 368–374 | Missing paces. Can you also reduce the indentation level by factoring out the innermost loop or something? | |
- fix indentation
- remove the probability where we repeatedly setting the same thing.
| llvm/lib/FuzzMutate/IRMutator.cpp | ||
|---|---|---|
| 222–224 | Yes, setting all is superfluous. I removed the repeated part, now we are only flipping the setting. (So we don't set true to ture). It takes a lot of mutations to set(or unset) every flag, so I think its a good idea that we keep an option to set everything at once. | |
| llvm/unittests/FuzzMutate/StrategiesTest.cpp | ||
| 354 | https://godbolt.org/z/nGarYT6Ef I think we do. The documentation (for call, phi, and select) says "that return a floating-point scalar or vector type, or an array (nested to any depth) of floating-point scalar or vector types", and llc is not complaining about this. | |
| llvm/lib/FuzzMutate/IRMutator.cpp | ||
|---|---|---|
| 251–252 | Why don't these do the set the opposite value like the fmf? Same for the existing GEP case (if you want to change the GEP case, do it in a separate change) | |
| 265–276 | You can dyn_cast to FPMathOperator to get all fast math flag compatible operations without maintaining the instruction list | |
fliping isExact as well. Using isa<FPMathOperator>(&Inst) to do test if FastMath is compatable.
| llvm/lib/FuzzMutate/IRMutator.cpp | ||
|---|---|---|
| 265–276 | I didn't know FPMathOperator can work on call inst. Thanks for pointing out. | |
I don't know exactly how the fuzz argument works, but won't these interfere? Setting all is superfluous with setting every individual flag