[llvm-bugs] [Bug 37669] New: opt-viewer fails with Error if tag '!Failure' is present

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Jun 3 22:18:34 PDT 2018


            Bug ID: 37669
           Summary: opt-viewer fails with Error if tag '!Failure' is
           Product: tools
           Version: 6.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: opt-viewer
          Assignee: unassignedbugs at nondot.org
          Reporter: steffen.seckler at tum.de
                CC: anemet at apple.com, llvm-bugs at lists.llvm.org

opt-viewer fails with error if tag '!Failure' is present in the yaml file
generated with  -fsave-optimization-record:

Reading YAML files...
        1 of 1Traceback (most recent call last):
  File "/usr/lib/llvm-6.0/share/opt-viewer/opt-viewer.py", line 316, in
    optrecord.gather_results(files, args.jobs, print_progress)
  File "/usr/lib/llvm-6.0/share/opt-viewer/optrecord.py", line 298, in
    get_remarks, filenames, num_jobs, should_print_progress)
  File "/usr/lib/llvm-6.0/share/opt-viewer/optpmap.py", line 50, in pmap
    result = pool.map(_wrapped_func, func_and_args, *args, **kwargs)
  File "/usr/lib/python2.7/multiprocessing/pool.py", line 253, in map
    return self.map_async(func, iterable, chunksize).get()
  File "/usr/lib/python2.7/multiprocessing/pool.py", line 572, in get
    raise self._value
yaml.constructor.ConstructorError: could not determine a constructor for the
tag '!Failure'
  in "None", line 1, column 1

such an error is generated if a loop vectorization fails even though it was
explicitly specified:

warning: loop not vectorized: failed explicitly specified loop vectorization
#pragma omp simd reduction(+ : fxacc, fyacc, fzacc) safelen(vecsize)
1 warning generated.

example of such a tag in the yaml file:
--- !Failure
Pass:            loop-vectorize
Name:            FailedRequestedVectorization
DebugLoc:        { File: ../../src/./pairwiseFunctors/LJFunctor.h, Line: 234,
                   Column: 9 }
  - String:          'loop not vectorized: '
  - String:          failed explicitly specified loop vectorization


add class Failure to optrecord.py:

class Failure(Remark):
    yaml_tag = '!Failure'

    def color(self):
        return "red"

One could also think about changing to color to sth. like dark red, or so.

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180604/41ff666f/attachment.html>

More information about the llvm-bugs mailing list