Magnetic flux ropes (MFRs) are thought to be the central structure of solar eruptions, and their ideal MHD instabilities can trigger the eruption. Here we performed a study of all the MFR configurations that lead to major solar flares, either eruptive or confined, from 2011 to 2017 near the solar disk center. The coronal magnetic field is reconstructed from observed magnetograms, and based on magnetic twist distribution, we identified the MFR, which is defined as a coherent group of magnetic field lines winding an axis with more than one turn. It is found that 90% of the events possess pre-flare MFRs, and their three-dimensional structures are much more complex in details than theoretical MFR models. We further constructed a diagram based on two parameters, the magnetic twist number which controls the kink instability (KI), and the decay index which controls the torus instability (TI). It clearly shows lower limits for TI and KI thresholds, which are n crit = 1.3 and |T w | crit = 2, respectively, as all the events above n crit and nearly 90% of the events above |T w | crit erupted. Furthermore, by such criterion, over 70% of the events can be discriminated between eruptive and confined flares, and KI seems to play a nearly equally important role as TI in discriminating between the two types of flare. There are more than half of events with both parameters below the lower limits, and 29% are eruptive. These events might be triggered by magnetic reconnection rather than MHD instabilities.